Send event parameters with every event and multiple tags in Google Analytics 4
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.
Related Posts
- User scoped custom dimensions in Google Analytics 4 using gtag
- Migrating a C# Integration from GA3 to GA4
- Email Alerts for new Referers in Google Analytics using Apps Script
- Export Google Fit Daily Steps, Weight and Distance to a Google Sheet
- Google PageSpeed Insights hates Google Analytics
(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.