Learn business growth with Google Analytics 4 Forums Google Analytics 4 Enhancing Analytics Tracking with Custom Dimensions in Google Analytics 4 Reply To: Enhancing Analytics Tracking with Custom Dimensions in Google Analytics 4

  • Olivia

    Member
    2 July 2023 at 7:22 am

    Absolutely, I’d be happy to clarify it for you. The thing is, it’s really a matter of how the code is formatted. Your current code might not be doing what you want it to because it’s in the incorrect format.

    Instead of the code gtag('set', 'dimension2', 'test'), it should actually be written as gtag('set', {'dimension2', 'test'}). That just means we’re incorporating the dimension and its value together between curly braces.

    Once you tweak that, everything should work as you expect. It’s a straightforward change that should have you seeing those custom dimensions in no time. So just make the switch and you’re good to go!