As explained in this previous post about Google Analytics 4 events, quite a few ‘events’ are automatically collected in GA4, like page_view, scroll, video_start, and file_download.
Here’s how you can create your own events.
February 11, 2021 by Adrian Durow . Analytics
As explained in this previous post about Google Analytics 4 events, quite a few ‘events’ are automatically collected in GA4, like page_view, scroll, video_start, and file_download.
Here’s how you can create your own events.
Add a new tag in GTM.
Select the ‘Google Analytics: GA4 Event‘ template.
Give the tag a nice descriptive name.
Insert your Measurement ID from GA4 using the ‘Configuration tag’ dropdown. Either by selecting ‘None – Manually Set ID’ and going back into GA4 to get your Measurement ID (get this from the property settings in GA4 > Data Streams > click on the Data Stream). Alternatively, you may well already have a configuration tag setup for GA4 within GTM:
Give your event a name, just like you would do with an event category, action or label in Universal Analytics. Replace any spaces you used with underscores:
Specify any parameters you’d like to add.
These are optional. But you might want to add values / variables that you’d like to include with the sending, and collection, of this event in GA4.
You might want to utilise parameters that are being used for other events which already exist in GA4. For example page_location is already a parameter used for the page_view event. So we might decide to use it here too. A full list of these automatically collected events are here: https://support.google.com/analytics/answer/9234069?hl=en&ref_topic=9756175
Or we might want to specify our own parameters, just like we’ve done for this event name. E.g. by using an existing GTM variable as our own parameter – like using GTM’s {{Click Text}} for an accordion_text parameter:
Then setup your trigger in GTM, as you would do normally:
Then publish!
Trigger the event, and check the real time reports in GA4 for your new event – which you should see if your IP address is not being treated as internal, and therefore being excluded (see here for how to check your internal filters in Google Analytics 4):
Wait an hour or so, and you should see your new event in the Engagement > Event reports:
Click on your event, to see the parameters you’ve sent in (if you specified any):