Learn business growth with Google Analytics 4 Forums Google Analytics 4 Trouble retrieving UserId dimension in GA4 (previously worked in UA)

  • Trouble retrieving UserId dimension in GA4 (previously worked in UA)

    Posted by Jack on 9 May 2023 at 6:51 pm

    So, here’s the story. I’d been using GTM to keep an eye on site visits and was also reporting a ‘userId’ that was getting generated every time a page loaded. Everything was working great when I set the userId as a ‘custom dimension’ in my GTM data layer.

    Then, I made a switch to Google Analytics 4 (GA4), and things got a little funky. I can’t seem to pull this ‘custom dimension’ anymore. It’s strange – I can see it’s getting collected in the debugger when I visit a page, but in any kind of report, the dimension pops up as ‘(not set)’. Interestingly, everything’s fine with another dimension called ‘companyId’.

    Anybody got the inside scoop on why this could be happening? Here’s a screenshot from the debugger showing the payload of my ‘pageview custom event’. Check it out and see if it rings any bells.

    Aiden replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Luna

    Member
    10 May 2023 at 8:17 am

    Sure! In Google Analytics 4 (GA4) the old way of managing users has changed a lot, becoming sorta “automated magic”. There’s a detailed guide available at this link: https://www.analyticsmania.com/post/google-analytics-4-user-id. It covers pretty much everything you need to know about implementing it. Best of luck, you’ve got this!

  • Aiden

    Member
    7 July 2023 at 5:04 pm

    This sounds like a problem of data syncing between Google Tag Manager and Google Analytics 4. Ensure that the ‘userId’ is defined correctly in GA4 as well, not just in GTM. Sometimes, data you see in the debugger doesn’t reflect in GA4 reports because it might not be configured correctly in GA4. Double-check the configuration settings and maybe wait a little because GA4 sometimes takes a while to reflect this data.

Log in to reply.