1

We push in the pages topic into the data-layer, this is autopopulated based on the category being selected when editing the page/post in the back-end (Wordpress).

    <script>
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
        'pageType' : "page",
        'topic' : "Core"
    });
</script>

However when I filter by topic e.g. 'Cyber Security' via a secondary dimension in Google Analytics most pages are showing under multiple topics.

For example our homepage topic falls under 'core' this is confirmed in the HTML (and shows in Google Analytics), yet it also shows under other topics.

The topic somehow seems to be 'leaking onto multiple pages'.

Any idea why?

enter image description here

2

I've just figured this out (with the help of the tag manager forum).

The issue was I had set the scope of the custom dimension as a session not a hit which caused the value to be overwritten for all prior pages a user visits in a single session.

For those interested this can be configured in: Property > Custom Definitiions > Custom Dimensions > Custom Dimension > Scope

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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