Send event parameters with every event and multiple tags in Google Analytics 4

gtag

There are some event parameters that are useful to send with every event. Google has a helpful guide here which even covers the case where you have multiple tags (I'm running GA4 and UA during the migration and this isn't unusual). You're supposed to call gtag set before calling config on each tag. This isn't working for me though, I see nothing coming through in the debug view.

Calling set before config works fine for user properties (my journey of discovery yesterday) but unless I was doing something stupid that I haven't seen yet no dice for event parameters. The code above uses the config method of initialization with a shared object to prevent duplicating code. This seems to work fine.

Add your comment...

Related Posts

(All Code Posts)

(Published to the Fediverse as: Send event parameters with every event and multiple tags in Google Analytics 4 #code #ga4 How to send common event parameters with every event in Google Analytics 4 )

Add Comment

All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.