Articles – Dave McComb https://davemccomb.com Dave McComb's musings on life, tech and everything in between. Fri, 13 Mar 2015 14:26:11 +0000 en-US hourly 1 Integrating Gravity Forms and KISSmetrics https://davemccomb.com/gravity-forms-kiss-metrics https://davemccomb.com/gravity-forms-kiss-metrics#respond Fri, 13 Mar 2015 14:26:11 +0000 http://davemccomb.com/?p=694 Recently I had to implement KISSmetrics with Gravity Forms for a client. Now as both of these are quite popular services, one would have thought there would be extensive documentation on how to best combine the two. Well, you’d be wrong…until now. Let me present my quick guide to integrating KISSmetrics and Gravity Forms! Please note […]

The post Integrating Gravity Forms and KISSmetrics appeared first on Dave McComb.

]]>
Recently I had to implement KISSmetrics with Gravity Forms for a client. Now as both of these are quite popular services, one would have thought there would be extensive documentation on how to best combine the two. Well, you’d be wrong…until now. Let me present my quick guide to integrating KISSmetrics and Gravity Forms!

KISSmetrics + Gravity FormsPlease note that while KISSmetrics does have default form tracking, it does not work well with Gravity Forms since you need to be able to specify field names. Unfortunately, one of the limitations of Gravity Forms is that field names are dynamically generated and cannot be specified. Using the KISSmetrics default form tracking only gives you field names like Input 1, Input 2, etc. (not very useful). And, as you cannot tag an email field as “email” KISSmetrics is unable to identify and track the user as anything but their standard anonymous ID.

So, that leaves us with having to set up the KISSmetrics API and the documentation on this is a bit lacking. Initially I tried to set it up with only the JavaScript API, but quickly ran into some limitations. It became apparent that using the PHP API was the way to go. Here are the steps to do that:

1. Install the KISSmetrics Javascript Tracking Code

Using the default Javascript tracking code for your site will create the anonymized identities that you need to track new users. I recommend using Google Tag Manager for this. Be sure to test this in the KISSmetrics Live tracking section of the admin to make sure it is properly installed.

2. Install the KISSmetrics PHP API code

At this time, KISSmetrics seems to be between two versions of their PHP API code. Their website documentation refers to the old API interface while their Github page refers to the new API. It’s a bit confusing. I’m going to use the old km.php file for these examples.

First, create a directory called “KISSmetrics” under your active theme and copy the km.php file to that folder. Make sure that the directory and file have read permissions.

3. Modify WordPress to call the KISSmetrics API on Gravity Form submission

The main file you will be changing is functions.php under your active theme. You’ll need to use the Gravity Forms hook “gform_after_submission” to call the KISSmetrics API after the form is submitted.

First, add your KISSmetrics API key to the end of your wp-config.php file. You’ll find your API key in the KISSmetrics admin for your account.

define('ENV_KS_APIKEY','XXXXYYYYXYXXYXYYXYXYXYXYXY');

Next, edit the functions.php file under the active theme. First, you’ll want to include the KISSmetrics API, so add this line near the top of the file:

require_once 'KISSmetrics/km.php';

Now, you’ll need to add both a call to the function as well as the function itself to the bottom of the functions.php file:


// Member Signup Form (Form ID 3)
add_action( 'gform_after_submission_3', 'form3_handler', 10, 1);

function form3_handler($entry){
	KM::init(ENV_KS_APIKEY);	
	$email = $entry['2'];
	
	$data  = array('First Name'=>$entry['6'],'Last Name'=>$entry['7'],'Email'=>$email,'Phone'=>$entry['3'],'Heard About'=>$entry['5']);
		
	if (isset($_COOKIE['km_ai'])) {
		KM::alias($_COOKIE['km_ai'], $email);
		KM::identify($email);
		KM::record('Member Signup Form Completed',$data);
	}
}

Some notes on this code:

  1. You’ll need to look up the form id under Gravity Forms. Use this ID for the add_action call as well as the handler (gform_after_submission_#, form#_handler). If you have multiple forms, you’ll need to duplicate this code using the different form IDs.
  2. You can access the form fields with the $entry[‘#’] where the # is the ID of that form field. Use a code inspector to find the form field ids for each form.
  3. The $data variable builds a list of all the form fields you want to submit to KISSmetrics. Edit as appropriate for your forms.
  4. You want to both alias and identify the user by email in KISSmetrics. You can read more about this in “Understanding Identities.”
  5. KM::record will record an event (name it what you want) and pass all  the data from the form to KISSmetrics.
  6. You can test that this is working in the KISSmetrics admin under the “Live” section. Please note that if using the “My Activity” tracking section, once you identify yourself, your activity no longer appears there due to a bug on their site. This can lead to hours of wasted debugging (personal experience). Use the main Live tracking feature for all people. It will make results much clearer.

That’s it. Hopefully these examples save you a few days of trial and error, but hey someone had to do it!

The post Integrating Gravity Forms and KISSmetrics appeared first on Dave McComb.

]]>
https://davemccomb.com/gravity-forms-kiss-metrics/feed 0
Oh The Places You’ll Go https://davemccomb.com/oh-the-places-youll-go Wed, 11 Jan 2012 14:22:00 +0000 http://davemccomb.com/oh-the-places-youll-go The post Oh The Places You’ll Go appeared first on Dave McComb.

]]>

The post Oh The Places You’ll Go appeared first on Dave McComb.

]]>
Brilliant… https://davemccomb.com/brilliant https://davemccomb.com/brilliant#respond Fri, 06 May 2011 19:46:00 +0000 http://davemccomb.com/brilliant What a great Google ad.

The post Brilliant… appeared first on Dave McComb.

]]>
What a great Google ad.

The post Brilliant… appeared first on Dave McComb.

]]>
https://davemccomb.com/brilliant/feed 0
Google Creates An Opt-Out Extension For Those Likely Blocking Their Ads Already https://davemccomb.com/google-creates-an-opt-out-extension-for-those-likely-blocking-their-ads-already https://davemccomb.com/google-creates-an-opt-out-extension-for-those-likely-blocking-their-ads-already#respond Mon, 24 Jan 2011 22:39:45 +0000 http://davemccomb.com/?p=441 A great new plug-in for Google Chrome that disables ad tracking… via Google Creates An Opt-Out Extension For Those Likely Blocking Their Ads Already.

The post Google Creates An Opt-Out Extension For Those Likely Blocking Their Ads Already appeared first on Dave McComb.

]]>
A great new plug-in for Google Chrome that disables ad tracking…

via Google Creates An Opt-Out Extension For Those Likely Blocking Their Ads Already.

The post Google Creates An Opt-Out Extension For Those Likely Blocking Their Ads Already appeared first on Dave McComb.

]]>
https://davemccomb.com/google-creates-an-opt-out-extension-for-those-likely-blocking-their-ads-already/feed 0
Write a blog post, help a dog https://davemccomb.com/write-a-blog-post-help-a-dog https://davemccomb.com/write-a-blog-post-help-a-dog#respond Sun, 19 Sep 2010 15:15:00 +0000 http://davemccomb.com/write-a-blog-post-help-a-dog Pedigree is having a great promotion where for every blog post about their adoption program, they will donate a 20-lb bag of dog food to a shelter. Of course, we had to do our part for this promotion! And, if you like their Facebook page, they will donate a bowl of dog food for every […]

The post Write a blog post, help a dog appeared first on Dave McComb.

]]>
Pedigree is having a great promotion where for every blog post about their adoption program, they will donate a 20-lb bag of dog food to a shelter. Of course, we had to do our part for this promotion!

And, if you like their Facebook page, they will donate a bowl of dog food for every new fan they get.  They are already over 1.1 million bowls of food donated.

The post Write a blog post, help a dog appeared first on Dave McComb.

]]>
https://davemccomb.com/write-a-blog-post-help-a-dog/feed 0
Have You Seen This Flyer? https://davemccomb.com/have-you-seen-this-flyer https://davemccomb.com/have-you-seen-this-flyer#comments Sat, 28 Aug 2010 23:08:17 +0000 http://davemccomb.com/have-you-seen-this-flyer – via Seattlest

The post Have You Seen This Flyer? appeared first on Dave McComb.

]]>
have-you-seen-this-flyer.jpg– via Seattlest

The post Have You Seen This Flyer? appeared first on Dave McComb.

]]>
https://davemccomb.com/have-you-seen-this-flyer/feed 1
Things I Want: Nixie Tube Clock https://davemccomb.com/nixie-tube-clock https://davemccomb.com/nixie-tube-clock#respond Wed, 25 Aug 2010 11:18:28 +0000 http://davemccomb.com/?p=366 The Chronotronix V400 Nixie Tube Clock may be one of the most elegant alarm clocks I have ever seen. This blend of electronics and style lends it well to the high-end geek lifestyle.  Though it begs the question: “Is $415 too much for an alarm clock?” – via Nixie Clock | Chronotronix V400 [Buzz-Beast]

The post Things I Want: Nixie Tube Clock appeared first on Dave McComb.

]]>
The Chronotronix V400 Nixie Tube Clock may be one of the most elegant alarm clocks I have ever seen. This blend of electronics and style lends it well to the high-end geek lifestyle.  Though it begs the question: “Is $415 too much for an alarm clock?”

– via Nixie Clock | Chronotronix V400 [Buzz-Beast]

The post Things I Want: Nixie Tube Clock appeared first on Dave McComb.

]]>
https://davemccomb.com/nixie-tube-clock/feed 0
Teaching Children About Charity https://davemccomb.com/teaching-children-about-charity https://davemccomb.com/teaching-children-about-charity#respond Tue, 24 Aug 2010 14:12:15 +0000 http://davemccomb.com/teaching-children-about-charity Very cool idea to teach children about charity – two piggy banks. One for them to save in and one to donate from. – via Piggy by Materious [Design Milk]

The post Teaching Children About Charity appeared first on Dave McComb.

]]>
Very cool idea to teach children about charity – two piggy banks. One for them to save in and one to donate from.

– via Piggy by Materious [Design Milk]

The post Teaching Children About Charity appeared first on Dave McComb.

]]>
https://davemccomb.com/teaching-children-about-charity/feed 0
Craigslist Updates Its Look https://davemccomb.com/craigslist-updates-its-look https://davemccomb.com/craigslist-updates-its-look#respond Thu, 12 Aug 2010 09:51:45 +0000 http://davemccomb.com/craigslist-updates-its-look Wow. After years and years of keeping the same old design, Craigslist has actually started to tweak its look.  Yes, these design changes are minimal, but it has made the site look a lot “cleaner.”  They’ve even added some JavaScript menu navigation on the sides. Like I said, nothing revolutionary, but a huge change for […]

The post Craigslist Updates Its Look appeared first on Dave McComb.

]]>
Wow. After years and years of keeping the same old design, Craigslist has actually started to tweak its look.  Yes, these design changes are minimal, but it has made the site look a lot “cleaner.”  They’ve even added some JavaScript menu navigation on the sides.

Like I said, nothing revolutionary, but a huge change for a site that has resisted making any changes over the years.

The post Craigslist Updates Its Look appeared first on Dave McComb.

]]>
https://davemccomb.com/craigslist-updates-its-look/feed 0
Best resignation ever. https://davemccomb.com/best-resignation-ever https://davemccomb.com/best-resignation-ever#respond Tue, 10 Aug 2010 15:28:40 +0000 http://davemccomb.com/best-resignation-ever This girl quits her job by sending 33 photos on a dry erase board to her entire office. Hilarious… Check out the rest of the photos at The Chive. UPDATE: Turns out it was all a hoax.  People believed it because I think everyone at some point would have wanted to quit this way.

The post Best resignation ever. appeared first on Dave McComb.

]]>
This girl quits her job by sending 33 photos on a dry erase board to her entire office. Hilarious…

Check out the rest of the photos at The Chive.

UPDATE: Turns out it was all a hoax.  People believed it because I think everyone at some point would have wanted to quit this way.

The post Best resignation ever. appeared first on Dave McComb.

]]>
https://davemccomb.com/best-resignation-ever/feed 0
Things I Want: AR Drone https://davemccomb.com/parrot-ar-drone-wifi-helicopter https://davemccomb.com/parrot-ar-drone-wifi-helicopter#respond Tue, 03 Aug 2010 16:46:31 +0000 http://davemccomb.com/?p=245 A remote controller helicopter? Cool. A WiFi helicopter controlled with your iPhone? Super cool. Video cameras? Pretty freaking awesome. Augmented reality and games? Must have now… Pre-sale price of $299.99? Hmmm…

The post Things I Want: AR Drone appeared first on Dave McComb.

]]>
A remote controller helicopter? Cool.

A WiFi helicopter controlled with your iPhone? Super cool.

Video cameras? Pretty freaking awesome.

Augmented reality and games? Must have now…

Pre-sale price of $299.99? Hmmm…

The post Things I Want: AR Drone appeared first on Dave McComb.

]]>
https://davemccomb.com/parrot-ar-drone-wifi-helicopter/feed 0
Things I Want: A Garden Zombie https://davemccomb.com/garden-zombie https://davemccomb.com/garden-zombie#respond Sun, 01 Aug 2010 23:47:16 +0000 http://davemccomb.com/?p=225 Ok, this is definitely something I want for my garden. Oh wait, I don’t have a garden. Hmmm… I wonder where else I could put it and if I could bring it as carry-on luggage. The Garden Zombie is only $89.99 from Think Geek.

The post Things I Want: A Garden Zombie appeared first on Dave McComb.

]]>
Ok, this is definitely something I want for my garden. Oh wait, I don’t have a garden. Hmmm… I wonder where else I could put it and if I could bring it as carry-on luggage.

The Garden Zombie is only $89.99 from Think Geek.

Garden Zombie

The post Things I Want: A Garden Zombie appeared first on Dave McComb.

]]>
https://davemccomb.com/garden-zombie/feed 0
Why you should stop drinking bottled water https://davemccomb.com/why-you-should-stop-drinking-bottled-water https://davemccomb.com/why-you-should-stop-drinking-bottled-water#respond Sat, 31 Jul 2010 22:26:09 +0000 http://davemccomb.com/why-you-should-stop-drinking-bottled-water More reasons to stop drinking bottled water. (via The Huffington Post)

The post Why you should stop drinking bottled water appeared first on Dave McComb.

]]>
More reasons to stop drinking bottled water. (via The Huffington Post)

The post Why you should stop drinking bottled water appeared first on Dave McComb.

]]>
https://davemccomb.com/why-you-should-stop-drinking-bottled-water/feed 0
Yow… https://davemccomb.com/yow https://davemccomb.com/yow#respond Wed, 16 Jul 2008 04:47:19 +0000 http://www.davemccomb.com/?p=38 This site has long been forgotten about. Yet another good idea that never quite materialized. I have just discovered that I do enjoy blogging though. Please be sure and check out my new site. Hopefully it will not go the way that this one did. But, who knows, maybe this one will be resurrected too… […]

The post Yow… appeared first on Dave McComb.

]]>
This site has long been forgotten about. Yet another good idea that never quite materialized. I have just discovered that I do enjoy blogging though. Please be sure and check out my new site. Hopefully it will not go the way that this one did. But, who knows, maybe this one will be resurrected too… Time will tell.

The post Yow… appeared first on Dave McComb.

]]>
https://davemccomb.com/yow/feed 0
Wow, blogs get out of date quickly… https://davemccomb.com/wow-blogs-get-out-of-date-quickly https://davemccomb.com/wow-blogs-get-out-of-date-quickly#respond Sun, 24 Jun 2007 17:40:13 +0000 http://www.davemccomb.com/2007/misc/wow-blogs-get-out-of-date-quickly/ So, I’ve now discovered that blogs quickly get out of date. I’ve posted some tech articles, but I just realized I haven’t updated my main page in over a year! Maybe I just don’t have anything that interesting to say… nah, that can’t be it. Well, one site that I did discover recently is Finetune. […]

The post Wow, blogs get out of date quickly… appeared first on Dave McComb.

]]>
So, I’ve now discovered that blogs quickly get out of date. I’ve posted some tech articles, but I just realized I haven’t updated my main page in over a year! Maybe I just don’t have anything that interesting to say… nah, that can’t be it.

Well, one site that I did discover recently is Finetune. It’s a great site that allows you to build custom playlists, stream music, listen to other’s playlists, etc. Take a listen to the playlist I put together of some of my favorite artists and tracks:

Ok, so that’s all I’ve really got for now. Check back later (hopefully, not a year later).

The post Wow, blogs get out of date quickly… appeared first on Dave McComb.

]]>
https://davemccomb.com/wow-blogs-get-out-of-date-quickly/feed 0
Videos https://davemccomb.com/videos https://davemccomb.com/videos#comments Sat, 06 May 2006 15:25:48 +0000 http://www.davemccomb.com/videos/ The post Videos appeared first on Dave McComb.

]]>
The post Videos appeared first on Dave McComb.

]]>
https://davemccomb.com/videos/feed 1
Welcome to the first entry in my blog! https://davemccomb.com/welcome-to-the-first-entry-in-my-blog https://davemccomb.com/welcome-to-the-first-entry-in-my-blog#respond Thu, 20 Apr 2006 03:49:20 +0000 http://www.davemccomb.com/wordpress/2006/04/19/welcome-to-the-first-entry-in-my-blog/ Ok, so I knew I should have had a blog for awhile now, and I even tried to set one up a few times before, but I never found any software that I really liked all that much…until now.  I just found WordPress and I have to say, I’m impressed. So far, the software is great! […]

The post Welcome to the first entry in my blog! appeared first on Dave McComb.

]]>
Ok, so I knew I should have had a blog for awhile now, and I even tried to set one up a few times before, but I never found any software that I really liked all that much…until now.  I just found WordPress and I have to say, I’m impressed. So far, the software is great! Still playing around with it all, so I’ll let you know what I think, but it seems to do a great job. I’ll be sure and let you know more of my thoughts on it later under the Tech category.

Plus, it really was time to get rid of my outdated, old site

The post Welcome to the first entry in my blog! appeared first on Dave McComb.

]]>
https://davemccomb.com/welcome-to-the-first-entry-in-my-blog/feed 0
About https://davemccomb.com/about https://davemccomb.com/about#respond Thu, 20 Apr 2006 02:16:35 +0000 http://www.davemccomb.com/about/ This section is not yet finished!

The post About appeared first on Dave McComb.

]]>
This section is not yet finished!

The post About appeared first on Dave McComb.

]]>
https://davemccomb.com/about/feed 0