-
'GA4 Custom Dimensions Not Working Properly'
Hey there tech buddies, I need a bit of help. Somehow, I’ve managed to run into a little snag with ga4 custom dimensions with tag manager. It’s not really making sense to me. Data is being pushed, but only on the article pages using this snazzy script I have, where each has a unique article id.
Here’s an example:
window.dataLayer = window.dataLayer || []; dataLayer.push({ 'article_id': '35b65338-0c94-4a90-84a0-082ed420eae2', 'type': 'article', 'category': 'News', 'subcat': 'Tourism', 'pubdate': '2023-05-10-07:55AM' });
However, the hitch is that the custom dimension isn’t syncing up. I’m puzzled because when I look at the screenshot, it should show #2 with pvu_article_id as my unique id, but instead I’m getting ‘(not set)’ and some mish-mash of article ids.
Even stranger, when I switch the custom dimension to sub category, it not only adds the dimension to the homepage, where I don’t even have the script, but also the article pages.
Just for the record, I do have enhanced measurement enabled, and ga4 custom dimension is set to scope using a user property. On tag manager, it’s using a ga4 event tag using user properties and triggers on all pages for page views.
Does anyone have an inkling why this is happening? I’ve tried different settings on both tag manager and ga4 custom dimensions but no luck. What I really need is for the script’s data to pass as custom dimensions, so I can filter out the articles when I’m reporting and in datastudio. For example, filtering out articles under the ‘Tourism’ subcategory.
Any ideas, anyone?
Log in to reply.