Est. Reading Time: 3 minutes
School may be out for the summer, but it is back to the basics this week for our Beacon blog! Since many of our customers are unfamiliar with all of the tracking capabilities Google Analytics provides, I thought it would be a good idea to differentiate the tracking custom variable options.
Custom variables are small tags you can put into your GA tracking codes that help you identify and define additional segments within your current website visitors you already review with GA. This will allow you to get a closer look how certain, more specific groups of visitors are migrating through your website. There are three custom variables you can define. A page variable lets you set it at an event or page view. A Session variable lasts each time the visitors is on your website. And lastly, a visitor variable lets you watch that particular computer or phone over time. When creating your custom scripts to track your custom variables, you need to define the four key parameters of index, name, value, and opt_scope like this _setCustomVar (index, name, value, opt_scope). Below is the explanation that Google provides for these specifics:
5, inclusive. A custom variable should be placed in one slot only and not be re-used across different slots.
femaleas two possible values.
3(page-level). When left undefined, the custom variable scope defaults to page-level interaction.
These variables allow you to see more in depth, but they also limit your scope of visitor engagement. Let’s say you have a shoelace website, and you have been noticing that a lot of your customers are adding items to their cart, but the actual revenue numbers after the sales have been complete do not match the amount in the initial cart baskets. We can use logic to figure out that people are removing items from their cart before checking out. By placing a session level custom variable in the tracking code, you can then have the ability to know (not guess!) the number of sessions where your website visitors removed an item from their carts and learn from their session trends how they are making their decisions.