Google Analytics 4 "set" method not working
Asked Answered
Y

0

1

Basically a dupe of this question, but that one's still unsolved, so I'll ask again:

I'm trying to set up GA4 (I am not using Google Tag Manager). According to this doc, the following two pieces of code should accomplish the same thing:

1)

gtag('event', 'testing', {'foo':'x'});
gtag('set', {'foo':'x'});
gtag('event', 'testing');

But only the first one works as expected. With the second one, the property "foo" is ignored - as if I never made the "set" call. So what's going on?

Yep answered 1/3, 2023 at 22:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.