Our pages can each have many tags, e.g 'football', 'sms', 'nsfw', etc.. which we would like to track in google analytics.

We're already tracking things like category using google analytics custom variables. We've used three of the five available slots so far.

How can we track tags the same way? If we just mush them all together - e.g. 'football, sms, nsfw' then can we track the ones that are tagged 'football'? What's the right way to track multi-valued page attributes using custom variables?

2 Answers 2


The only way I can think of doing this is to customise the URL being tracked by analytics eg domain.com/category/page-name/+tag1+tag2+tag3. You can then see traffic relevant to any combination of tags but filtering results with your desired tags in GA.

The drawback of this method is it will create a heap of different URLs for the same page in GA.


Depending upon how many tags you have in total in your website, you can create a binary function checking whether a specific tag exist on any given page or not and get that value fired as page level custom variable.

I'd however suggest you append tag names to URLs as parameter and then have data collected in a separate profile where you can see the mapping of URLs to tags and see the pageviews or any other data. You can exclude that query param in your current settings of GA profile.

However if your need is to know the affinity between tags, you need different solution though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.