How to configure the Google Analytics GA4 Event Tag in Matomo Tag Manager
The Google Analytics GA4 Event Tag allows you to send specific visitor events, such as button clicks or form submissions, to your GA4 property for reporting without directly embedding Google’s tracking scripts on your website. By using Matomo Tag Manager, you can manage all your tags in one platform to simplify tracking configurations.
This guide explains how to configure the GA4 Event Tag in Matomo Tag Manager, so you do not need to set up additional tracking in Google Analytics.
Requirements
Before configuring the GA4 Event Tag in MTM, ensure the following is in place:
- You have a Google Analytics account with a GA4 property.
- The Google Tag (gtag.js) must be correctly configured in Matomo Tag Manager.
- The Matomo Tag Manager container code has been installed on your website.
Define the GA4 Event Tag
- In Matomo Tag Manager, navigate to Tags and click Create New Tag.
- Choose the Google Analytics GA4 Event Tag and provide a descriptive name.
- It is optional to enter the Parameter and Value fields to provide additional context about the event being tracked. For example, if tracking clicks on a button, you may want to include a parameter like
ClickText
with a value of signup. This information is then displayed in your Google Analytics reports. - In the section, Configure when the tag should do this, choose the trigger that will execute the tag, e.g., a custom event trigger could fire the tag when a Sign Up button is clicked.
- Save the new tag.
Test and Publish
- Use the Preview and Debug mode in Matomo Tag Manager to test your configuration.
- Perform the actions on your website that are supposed to trigger the GA4 Event Tag (e.g., button clicks).
- In the Preview panel, check the Tags tab to confirm the GA4 Event Tag is firing when expected.
- Go to your Google Analytics account and view the Real-time reports to check the interactions are being recorded. If you are not seeing data in your GA reports, ensure the Google Tag (gtag.js) is correctly configured in Matomo Tag Manager.
- Once successfully set up, publish the changes to your live environment.