How to configure the Google Tag in Matomo Tag Manager
To send visitor activity from Matomo to Google Ads, Google Analytics, and Google Tag Manager for additional reporting, use the Google Tag in Matomo Tag Manager (MTM) and avoid having to add extra scripts to your website’s code.
Managing all your tags in MTM offers centralised management from the Tag Manager interface where you can define when tags execute based on custom conditions, e.g., on specific events. This is useful for complying with consent preferences and controlling when data is sent to third-party services.
Define the Google Tag
- In Matomo Tag Manager, navigate to Tags and click Create New Tag.
- Choose the Google Tag and provide a descriptive name.
-
Enter your Google Tag ID in the Tag ID field. Read more about how to find your Google Tag ID.
-
In the section, Configure when the tag should do this, select an existing trigger or create a new trigger that will execute the Google Tag every time the trigger fires.
- Save the new tag.
Once the Google Tag is configured and functioning, you can add the Google Ads Conversion Tag if required. This extends your tracking to ensure conversion actions, such as purchases or sign-ups, are accurately attributed to your Google Ads.
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 Google Tag (e.g., pageviews or button clicks).
- In the Preview panel, check the Tags tab to confirm that the Google Tag is firing as expected when the trigger conditions are met.
- In your Google account, check the Real-time reports to ensure that the expected interactions are being recorded.
- Once tested, publish the changes to your live environment.