This article addresses two practical implementation concepts that can increase the effectiveness of your campaigns and campaign analysis: 1. Pathing analysis for your campaign and 2. Hashing your SEM campaign codes. While this article specifically addresses features and capabilities within Omniture SiteCatalyst, the principles of these concepts are applicable in other web analytics solutions, as well.
While the campaign conversion reports are very useful in many respects (you can track success events, sub-relate with other conversion variables, etc.), they lack other critical features that SiteCatalyst has to offer. Particularly, it would be very useful for you to know what paths visitors took when they came to your site via a campaign tracking code. Now, you can use success events to determine if visitors on a certain campaign actually make it to product pages or actually make some sort of conversion on the site; however, simply using these success events will prevent you from seeing how many pages it took for people to actually get there. What if there was a way to examine how people traversed you site based upon the campaign you entered in on? Well, there is a way, and all it requires is a custom traffic variable with pathing tracking enabled! (refer to ClientCare to get this turned on)
You will need to contact Omniture ClientCare if you do not have pathing activated on the custom traffic variable of your choice yet. After you have done this, we need to define and propagate the data in in either the s_code.js file or the page code itself. Now lets take a look of some example code taken from this site:
if(s.campaign) { s.prop6=s.pageName+" : "+s.campaign; s.eVar6=s.prop6; } else { s.prop6=s.pageName+" : ORGANIC"; }
This code examples first examines to determine if the page has a value in the campaign variable. If a campaign exists, then the Page Name variable is brought in, delimited by a colon, and then concatenated with the campaign ID code. The value is also put in to an custom conversion variable simply for continuity reasons and to track conversion events in relation to this new value. If no campaign is associated with that page, I simply added an ORGANIC code at the end of the page value. Now when you perform pathing analysis on this new report variable, you can examine very interesting trends and patterns from your campaign traffic. This can be very useful to measure your campaign effectiveness on an even deeper level!
Note about campaign codes: Studies suggest that customers prefer short, understandable URLs as opposed to lengthy or complex ones. Indeed, best practices of web design and development maintain the three components of a good URL are clarity, conciseness, and organization. According to this doctrine of implementation, your campaign tracking codes should also be somewhat friendly.
The other day, I was working with Google Webmaster Tools to help optimize my search rankings, and while conducting some test searches, I noticed this:
*sarcasm* Grrrreat, now I have two search results that go to the exact same page! What does this mean?
Frustrating, isn't it? It seems that if you want to run marketing and external campaigns using a query string parameter, then your SEO efforts will almost certainly suffer. I have seen a simple workaround some people use: they update their robots.txt file to disallow any crawling of URLs with campaign query string parameters (for more click here), but that still hurts your search rankings in SEO in the sense that traffic resulting from the campaign cannot be aggregated into your regular page's statistics. Enter the glorious hash (#) mark. The hash in URLs is designed to allow one to jump to various points within the page based upon the identifier following the hash. The browser then simply matches this value to an anchor tag id somewhere else on the page. However, if we use a hash identifier that cannot be found on the page, then the browser simply displays the page as it normally would. On top of that, the hash symbol and anything following it is not considered by search engines. And this is where we find an excellent solution. Instead of using query string parameters for campaign tracking, we can simply use the hash mark as our guide. See this example SiteCatalyst code I have in my JS file:
s.campaign=s.getQueryParam('cid'); if(!s.campaign) { var cidHash=document.location.hash.split("cid-"); s.campaign=cidHash[1]; }
Most web analytics solutions easily allow for you to pull a tracking code into their statistics by means of a javascript plug-in. In this case, I use the s.getQueryParam('cid') command to pull in any old campaign tracking codes that still might employ the use of the query string. The next line checks to see if that has happened. If not, we can move on to checking my new and current implementation. The document.location.hash.split("cid-") command simply takes the hash portion of the URL and splits it according to the specified delimiter (which can be anything you want it to be). This is helpful in determining what is a campaign tracking code and what is a legitimate on-page link. That value is then passed into the s.campaign variable, sent to SiteCatalyst, and voila! You now have campaign tracking that still contributes to your SEO rankings. And then your Google searches will look more like this:
* Note: In the interest of full disclosure, I work as an employee of Omniture, Inc. However, the views represented here in no way reflect the opinions or overall position of the company. *
Comments
New or exiting Conversion Variable
When you tie the conversion variable (eVar6) to the s.Prop (s.eVar6=s.prop6). Is this an existing conversion variable or a new one?
New Conversion Variable
Since the campaign code is used to track conversions, I chose to use a new eVar (in this case eVar6) in order to capture this concatenation of the pageName and s.campaign value. This is entirely optional and does not need to be used in order for the principal code to work. However, due to my implementation, I am able run a sub-relation report between campaign and eVar6 to see landing pages for each campaign.
For the benefit of full-disclosure, I am currently an Omniture employee. My views in no way reflect the views or opinions of Omniture. There is no official link between my statements and this corporation.
Excellent article
Just came across your article and wanted to say thanks, as the first trick covered a problem I was trying to get my head around with tracking campaigns through to completing events.
For the second, don't forget that you can now use the rel="canonical" tag to indicate to search engines which url should take priority. Good examples can be found over at the Google blog but all the major engines should support the tag.
Thanks again.
Manwah
rel="canonical"
Thank you for your comments. In regards to the rel="canonical" option, that is true in the case of Google, but not all Search Engines recognize this tag. The hash mark method is guaranteed to work with all Search Engines.
"Love like you've never been hurt,
Work like you don't need the money,
Dance like nobody's watching!"
Another way to filter out query strings in search results
I have been asked to address the idea that one can filter query strings out of searches not only by the robots.txt, but by using Google Webmaster Tools (and similar tools in Yahoo!, Live, and other search engines). While it is true that one can do some level of filtering based upon query string parameters, it is still filtering the data OUT altogether, and thus your search rankings cannot benefit from the traffic your campaigns generate.
For the benefit of full-disclosure, I am currently an Omniture employee. My views in no way reflect the views or opinions of Omniture. There is no official link between my statements and this corporation.