Utilizing Analytics.js for Tag Analysis
I have 3 articles each with an array of tags, for example: Rihanna, Beyonce, and JayZ
My goal is to determine which tag is the most popular among users.
In the first article, I only have the JayZ tag and I send the dimension as:
ga('set', { 'dimension1': 'JayZ', });
ga('send', 'pageview');
However, the second and third articles have arrays containing [Rihanna, Beyonce] and [Beyonce, JayZ] respectively.
How can I send these tags as separate parameters to a single custom dimension?
The method above sends a simple string of all tags combined.
ga('set', { 'dimension1': array, });
This approach only captures the last parameter sent:
ga('send', 'pageview' {'dimension1': 'JayZ', 'dimension1': 'Beyonce'});
Using separate dimensions for every tag is not feasible as I have 10,000 tags on my website =)