As almost of we all know , Urchin just has one User Level variables support Out of the box, , but what happens if we need to use custom variables under another scope, for example under Page Level Scope?
Well we can use this easy trick with some filters and 2 profiles to achieve this functionality.
We will need to use this tiny script to ensure that we will always have 2 uri segments before the real Uri Path.
var key = ‘(not-set)’;
var value = ‘(not-set)’;
var uri = window.location.pathname;
var uri = ‘/’ + key + ‘/’ + value + window.location.pathname;
After this we will create 2 filters:
- One to have the content data without the first 2 uri segments, We will need to use this filter to achieve this
- Another one that overwrites que content data just with the first 2 segments, so we can view our custom vars data under drilldown report
After this we will create 2 profiles, thyngster.com_orig and thyngster.com_month_cvar for example and we will apply one filter to each them.
We will have then, one profile with the original data, like if we haven’t done any custom urchin code, and another one that will show us the custom var info under Content Drilldown Report within Urchin Interface.
We could had used more than one custom variables and use another filters to split the data, but we will cover this scenario in another post.
I haven’t tried it in a live and real website ( yet ), let me know if it worked for you 🙂
Latest posts by David Vallejo (see all)
- SEO meets GA: Tracking search bots visits within measurement protocol - November 16, 2016
- Cross-Domain tracking with clean urls - November 1, 2016
- Bringing back utm_nooverride functionality to Universal Analytics - October 31, 2016