I have read the link below but I am unable to understand the exact difference between the different levels of custom variables. Can anyone help me understand this??
http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
“visitor” level (scope) is for being able to associate the custom variable dimensions with metrics across multiple visits.
“session” level (scope) is for being able to associate the custom variable dimensions with metrics across the current visit.
“page” level (scope) is for being able to associate the custom variable dimensions with metrics on a single page.
For example, let’s say I have on my website a “contact us” form for a user to fill out. In fact, I have lots of different forms, and this is just one of them. So I use a custom variable to record the name of the form whenever a user views a form. So when a user views my “contact us” form, I populate custom event 1 with “contact us” (doesn’t matter how you setup the hierarchy for the variable, that’s not relevant to the point).
When the user completes the form, they are taken to a “thank you” page, and I have an event trigger.
So to recap:
Form view page: custom var 1
Form conf page: event
Now I want to go into the GA reports and take a look at the data for my forms. One way to do this is to go and build a custom report. I can use the custom variable 1 dimension(s) to see how many people viewed my “contact us” page. But what about how many people actually completed the form? This is where the custom variable level (scope) comes into play.
If I had set the custom variable to “page” level, I would not be able to use the event metrics with my custom variable dimensions. It would all show up as 0 or equivalent. Why? Because I triggered the custom variable and event on two different pages, and “page” level custom variables do not carry over from page to page. It’s like setting and using javascript variables on a page – they don’t carry over from page to page. You have to use cookies or pass them through link URLs or use server-side session variables to get the values to carry over from page to page.
And that’s where session and visitor level (scope) custom variable types come into play. If I were to set my custom variable as session, it will associate the event to the custom variable, even though it’s on a different page, as long as it’s within the same session (visit).
Visitor level (scope) is the same as session, except that it works across multiple sessions/visits. So for instance, if I were to go to the form page and custom variable triggers, wait an hour or whatever for my session to time out, then complete the form, it will still associate the variable to the event; I will still see a hit for the event for my “contact us” dimension value.
Which level/scope you want to pick largely depends on your reporting needs and what you are actually tracking. In my experience, page level custom variables are rarely useful, because most people want to be able to ask questions and make correlations between things that aren’t directly tied together on the same page of my site (like, not in the same place or whatever).
For instance, page level custom variables are useless for certain things if you have a form that spans several pages or takes a long time to fill out and user has an option to save progress and return to it and finish it later (for instance, forms where you signup for college and classes etc… tend to be long and allow you to save progress and come back later). For many of the things you want to track in this case, you will want to use session and visitor level custom variables.