fnogatz / magento2-matomo

Matomo Analytics Module for Magento 2
GNU Affero General Public License v3.0
50 stars 37 forks source link

Support Matomo Tag Manager #32

Open tsteur opened 6 years ago

tsteur commented 6 years ago

As announced last week there is now a Matomo Tag Manager available which integrates into Matomo and eventually will be directly shipped with Matomo.

It would be great if you could offer an easy way for users to embed their Tag Manager containers. We have written a guide that helps on how to write an integration plugin: https://developer.matomo.org/guides/tagmanager/integration-plugin

Please let me know if there are any questions. Happy to improve the guide and making integrations as easy as possible.

FYI: Piwik is now Matomo.

amenk commented 3 years ago

We are also interested in this. Is there any news about this? Did anybody start working on this.

@tsteur Does it mean that the datalayer calls also have to be replaced or is it only about the container embedding?

amenk commented 3 years ago

I am working on this, but for the https://github.com/fnogatz/magento2-matomo fork

amenk commented 3 years ago

@fnogatz You can have a look at the pull request https://github.com/fnogatz/magento2-matomo/pull/1 - it basically already tracking page views. But I think I have to push different options, because in the tag manager preview debug log I see

14:24:14.881 | "method setEcommerceView is not valid"
14:24:14.883 | "method trackPageView is not valid"

And also

"method addEcommerceItem is not valid"
amenk commented 3 years ago

It looks like in Matomo Tag Manager new tags for all the events have to be created (https://matomo.org/faq/tag-manager/faq_35847/) - wondering if we can do this seamlessly, so that Matomo Ecommerce Tracking works with less possible changes.

amenk commented 3 years ago

I came up with this solution for warding the ecommerce events to Matomo https://github.com/iMi-digital/magento2-matomo/blob/main/doc/tag-manager.md

amenk commented 3 years ago

New pull request https://github.com/fnogatz/magento2-matomo/pull/51