Get More From Your Campaign Tracking using the clickThruQuality Plugin

NOTE: UPDATED 7-22-09 Many of us are using the s.getQueryParam plugin matched with the s.campaign variable to track your paid search. You have your paid search click thru URL and your tracking code right on the end, something like http://webanalyticsland.com/?cid=Google and the query string parameter value gets dumped right in to your campaign measurement. This as we know is the preferred method of tracking paid search. You can pull up your campaigns report, add in your conversion events and there you go. You can see which campaigns converted and which ones didn’t. Unfortunately that gives you an all or nothing view of things. What if you wanted a little more? This sounds like a job for the s.clickThruQuality plugin.

What this plugin does is sets an event on each time a visitor clicks through to your site. Nothing exciting yet. But then when the visitor makes it one page past that landing page, it sets a second event. Now you can see which ad group, landing page or campaign engaged the visitor a little more than the rest. You will end up with a report that looks a little something like this:
Click Thru Quality Report
This example is pretty high level, but using individual tracking codes for your keywords this report can really give you a good look at your paid search campaigns.

First thing you need to do is to set one variable, I have it right after the s.usePlugins=true call.

/* CTQ variables */
var i=1;

Next you will need to use two events. A call to the plugin needs to be added right after your campaign tracking code:

	if(!s.campaign)
		s.campaign=s.getQueryParam('cid',':');
		s.campaign=s.getValOnce(s.campaign,'s_campaign',0);		
		s.clickThruQuality('cid','event1','event2');

In the call to the plugin you need to add in which tracking code you are looking to track, and the two events you want to use. Name one event Click Through and the other Click Past. Then add the actual plugin code into the plugins section of the s_code.js file:

/*
 * Plugin: clickThruQuality 0.8
 */
s.clickThruQuality=new Function("scp","tcth_ev","cp_ev","cff_ev","cf_th", ""
+"if(i<=1){var ev=(s.events?s.events+',':'');if(s.getQueryParam(scp)){s.events=ev+"
+"tcth_ev;if(s.c_r('cf')){var tct=parseInt(s.c_r('cf'))+1;s.c_w('cf',tct"
+",0);if(tct==cf_th&&cff_ev){s.events=s.events+','+cff_ev;};}else{s.c_w('cf',1,0"
+");}}else{if(s.c_r('cf')>=1){s.c_w('cf',0,0);s.events=ev+cp_ev;}}i++;}");

Enjoy!

Leave a Reply