Viewing Pageviews for Custom Variables in Google Analytics

Recently I started using Google Analytics Custom Variables to track additional information about one of my sites. What I discovered when viewing the Custom Variables section in GA however, was that it was showing visits and not pageviews. What I wanted to see was what page each variable value was set on, and the number of pageviews it had.

To do this you need to create a segment in GA. Start by clicking the segment dropdown near the top of most reports:

Screen Shot 2013-11-06 at 8.13.45 AM

Next click “Create New Segment”. You will then be presented with a bunch of options of how to segment your traffic. Under “Advanced” click “Conditions”. Then choose “Custom Variable (Key X)” where X is the key you used when you setup your custom variable on your site. Change the comparison operator to “exactly matches”, then choose the key you used. At this point you could view your segment. However if you used multiple values for your variable, it is best to setup a segment for each value. To do this simply click the “And” button to the right of your first condition, and add a second filter with “Custom Variable (Value X)”, “exactly matches” and the value of the variable in the input box. Click “Save” and you should now see results for your custom segment.

Screen Shot 2013-11-06 at 8.21.43 AM

If you repeat these steps for every value of your custom variables, you can then view multiple segments and see which custom variable value performed the best.

Screen Shot 2013-11-06 at 8.26.56 AM