Search code examples
google-tag-managergoogle-analytics-4

How can I track news categories in GA4?


We have a gtm-tag article_read which include parameters such as news_id, article_title, news_id and so on.

How can I include a list of categories in the article_read-tag?

The categories are: Electricity, Refrigeration, Sanitation, Water & sewer, Ventilation and Heat.

Each news-article can have none or several categories.


Solution

    1. You want to make these categories available to your GTM. So you either parse every article page to get the categories or ask the front-end to push them to the dataLayer on pageviews, which would definitely be a more robust solution.
    2. Once you have the list accessible through GTM, you want to sort it, say, alphabetically and use that in your event property.
    3. Don't forget to register the property in GA.

    Note that analysis on this will be a bit tricky. You'll have to use contains on this dimension. But it's much better than nothing. You would have more options if you did ETL, or if you used a more advanced analytics solution. GA is generally a free product, hence the limitations.