GA4 Custom Events: How to Create Them in Tag Manager

Cover image: GA4 Custom Events: How to Create Them in Tag Manager

An event is a user action tied to a specific element on a website or in an app. Google Analytics 4 splits events into four types: automatically collected events, enhanced measurement events, recommended events and custom events.

Custom events are the ones GA4 does not track by default, for example a click on a specific button or a submitted contact form. For most service businesses these are the events that matter, because they are the closest thing to a lead.

How to set up custom events in GA4

1. Sign in to your Google Tag Manager account and go to Tags in the left-hand menu.

GA4 custom events in Google Tag Manager: Tags menu

2. Click New.

GA4 custom events in Google Tag Manager: new tag

3. Name your new tag, for example Button click, and click Tag Configuration.

GA4 custom events in Google Tag Manager: tag name and configuration

4. In the window that opens, select Google Analytics: GA4 Event.

GA4 custom events in Google Tag Manager: GA4 Event tag type

5. Click the dropdown in the Configuration Tag field.
If you have already set up a configuration tag, select it.
If not, choose None - Manually Set ID.

GA4 custom events in Google Tag Manager: configuration tag dropdown

GA4 custom events in Google Tag Manager: manually set measurement ID

6. Enter the event name, for example button_click. The name you type here is what will show up in your Google Analytics 4 reports.

GA4 custom events in Google Tag Manager: event name

7. Expand Event Parameters and click Add Row. (Adding event parameters is optional.)

GA4 custom events in Google Tag Manager: event parameters

8. Enter a parameter name, for example button_name.
Click the ‘+’ icon next to the Value field.
Select Click Text.

GA4 custom events in Google Tag Manager: parameter value from Click Text

9. Click the Triggering section to create a new trigger.

GA4 custom events in Google Tag Manager: triggering section

10. Click the ‘+’ button in the top right corner.

Screenshot: creating a trigger for a GA4 custom event

Screenshot 2: trigger configuration for a GA4 custom event

11. Choose the trigger type All Elements and the option All Clicks. Click Save.

Screenshot 3: All Elements trigger type

Screenshot 4: All Clicks option

12. Set a trigger exception if you need one.

Screenshot 5: trigger exception

13. Click Save in the top right corner. You will see a summary of the tag configuration.

Screenshot 6: tag configuration summary

14. Click Submit to publish your trigger and tag.

Screenshot 7: submitting the GTM container

Google keeps a list of recommended events with standard names here: Recommended events for GA4
https://support.google.com/analytics/answer/9267735?hl=en

15. Once your custom events are created, you have to wait until GA4 registers them. That only happens after the event actually fires on the site, so trigger it yourself and then watch for it under Reports Engagement Events in the left-hand menu.

Then, in the same place, hover over every event that matters to your business (the ones you want to optimize your campaigns for), click the three-dot icon next to it and choose Mark as key event (in older versions of GA4 the option was called Mark as conversion).

GA4 custom events: marking an event as a key event

Marking an event as a key event is the moment GA4 stops being a visit counter and becomes a source of data for campaign optimization. To get that data into your ad platforms despite browser tracking restrictions, you also need server-side measurement. We explain how it works on our server-side tracking page.