Many sites nowdays self promote content deep within from the home page. In many ways this should be considered an internal campaign. On larger websites with multiple stakeholders involved, it becomes even more important to measure how successful internal campaigns are peforming. By default Google Analytics has the ability to track external campaign links pointing to your website, however it does not come with built in functionality to track internal campaigns.
One solution is to use custom variables to track internal campaigns. By using these campaign variables, you can slice and dice your visitor's movement on your website easier. If you're not familiar with campaign link tagging I suggest you click through a couple links in your RSS feeds (Slashdot, specifically uses them) and you'll notice that there are several query strings appended to each link.
Example Tagged Link:
Each of these query strings translates into a dimension in Google Analytics. Below is the anatomy of our URL:
&utm_source=feedburner &utm_medium=feed &utm_campaign=Feed%3A+Slashdot%2Fslashdot+%28Slashdot%29 &utm_content=Google
I'm not going to go into too much depth on the built in external campaign tracking for Google Analytics since that's been covered by every blogger in existence already. Google provides an quick and easy form with explanations for each query string value here anyway - http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55578
Using utm_* Query Strings For Internal Campaign Tracking?
NO! Never do this! I suspect many people first consider this when attempting to track internal campaigns but here's why you shouldn't. Each of these query strings is written to a cookie within Google Analytics. If a user searches "Internet Explorer hacks" on Google the following would happen:
utm_source = google.com utm_medium = google / organicIf you custom 'tagged' an internal link you'd essentially overwrite the existing utm_source & utm_medium data with your new data thus loosing the original source of the users visit. This is very very bad.
Enough Already, Just Tell Me How To Do This!?!?
Ok, sorry for the long intro but I needed to get that out of the way before moving any further. Instead of using utm_* query strings let's use our own custom query strings, say one that starts with int_
The Following URL:
Hidding Query Strings Within Google Analytics
Next, configure the Google Analytics profile to exclude these new query strings. Otherwise the URLs are going to look different within the reports depending on the refering page and it will render your stats very useless.
- Navigate to Analytics Settings > Profile Settings > Edit Profile Information
- Under 'Exclude URL Query Parameters:' include the following query strings int_source, int_campaign, int_medium, int_content (or your own)
Configuring Your Google Analytics Tracking Code For Internal Campaigns
Finally, you'll need to slightly modify your tracking code to send these custom variables to Google. This uses Google's pageTracker._setCustomVar function. The names (i.e. Internal%20Campaign) can be named to whatever you like.