Do you find all information about us and our services?
Extensions by Category
🏷 9. Matomo Tag Manager Integration
For users who require more advanced and flexible tracking configurations, the JaJuMa Matomo Analytics extension provides a full integration with Matomo Tag Manager (MTM). MTM allows you to manage all of your third-party tracking snippets (known as tags) from a single interface, governed by rules (triggers) and dynamic values (variables).
Navigate to JaJuMa -> Matomo Analytics -> Configuration
and expand the Matomo Tag Manager section.
🔧 9.1 Tag Manager Configuration
Enable Matomo Tag Manager
- Yes: Enables the MTM container on your site.
- No (Default): MTM is disabled.
Container ID
Enter the unique Container ID for the MTM container you want to deploy. You can find this in your Matomo instance under Tag Manager.
- Example (Live Environment):
V3lCFYdS - Example (Dev Environment):
V3lCFYdS_dev_c3a5c5649301528edef95159
Product EAV Attributes
Select any additional product EAV attributes that you want to be included in the e-commerce data layer.
This allows you to pass custom product data (e.g., brand, margin_group) to MTM for use in your tags.
Load Tag Manager after user interaction
Similar to the main JS tracker, this setting defers the loading of the MTM container until the first user interaction.
- Yes (Recommended): Delays loading to improve your store's initial load performance and Core Web Vitals scores.
- No: Loads the MTM container immediately on page load.
💡 9.2 Quick Start: Using the Sample JSON Import
Setting up e-commerce tracking in a tag manager from scratch can be a complex process involving the creation of dozens of tags, triggers, and variables. To dramatically speed up this process, the extension provides a pre-configured JSON file that you can import directly into MTM.
This sample file contains a best-practice implementation for a full Magento 2 e-commerce tracking setup.
How to Import the JSON Template
- In the Magento configuration, copy the entire contents of the Sample Json Import text area.
- Log into your Matomo instance and navigate to the Tag Manager section. Select the container you are using.
- Go to the Versions tab and click the Import button.
- Paste the JSON data you copied from Magento into the text area.
- CRITICAL STEP: You must replace the placeholder IDs in the JSON with your actual Matomo IDs. Use your text editor's "Find and Replace" function:
- Find
CONTAINER_IDand replace it with your MTM Container ID. - Find
SITE_IDand replace it with your Matomo Site ID (this needs to be done in two places).
- Find
- Click the Overwrite current draft with this version button.
- After the import, you can explore the Tags, Triggers, and Variables tabs to see the complete e-commerce setup that has been created for you.
To verify the data layer is working on your storefront, you can open your browser's developer console and type window._mtm to inspect the data being pushed.
📞 Need Help?
Still have questions or need help with your configuration? Our expert team is here to assist. Please don't hesitate to contact our support team for personalized assistance.
Ready to unlock these features for your store?
The JaJuMa Matomo Analytics is the all-in-one solution for privacy-focused, performance-friendly analytics in your Magento store.
Find all you need to know and more valuable insights about Hyvä and Magento.
Expertly curated by JaJuMa:
Your central resource for everything Hyvä.
Your central resource for everything Magento.