Tag manager not compatible with the basic analytics code

As several others, I am experiencing similar problems when using both Tag manager and the basic analytics code.

I tried the solution to remove the basic tag and instead use the tag manager code snippet in the html. Unfortunately this resulted in less data being tracked. I also noticed that when using the Tag manager code snippet, I got several hundreds pageviews on “Page Name not defined”. Basically, even though I want to use Tag manager, it is not worth all the problems generated from removing the basic code snippet. I do recall that when using Google Analytics you are usually only using the tag manager code and it does not effect the collected data. Should Matomo work the same way?

I tried adding the basic analytics code in a custom html tag, but no luck. Still get the “page Name not defined”.

Any tips on resolving the issue? Tag manager is an important feature, would be a shame not to use it.

If page title is missing, maybe check what trigger you have configured for Matomo Tag. Eg are you using DOM ready trigger instead of Pageview trigger?

1 Like

In the custom html tag where I tried to add the tag manager code snippet, I used a pageview trigger. I don’t even know if it is possible to get a fully functional tag manager with a custom html tag. Surely the code snippet should be added directly into the html on the website. Either way, the Page name not defined is still an issue.