Doubled Events when Event Tags in source + PageView Tag in MTM

Hi,

I’m currently facing a “mistery” situation ; I searched the forum but I didn’t find similar issue.
I’ll try to explain as accurately as possible ;

In our web-application, we first set Matomo Analytics including the Tags directly into the code (PageView and Events tags).

At the moment, we are changing our implementation method, introducing the use of Matomo Tag Manager.

In order to operate this change gradually, we first started to remove the Pageview Tag from the code, and we now trigger it from Matomo Tag Manager. This works OK, no problem.

The issue :
The issue occurs with Events Tags, which are still in the code, and not in MTM.
When we click on those elements, it doubles the tracking of these Events !
(we can see the two matomo.php calls in DevTools/Network)
Note 1: The PageViews are not doubled.
Note 2: If I test an Event from Matomo Tag Manager, it is not doubled.

To confirm this issue, I tried to deactivate the PageView Tag, and then, we don’t have the ‘double Events’ anymore.

The question :
Did anyone faced the same situation ? How can we avoid this effect ? (in the future weeks we will migrate All the Events to Tag Manager, but until we do this, we need to keep the figures correct)

Thanks a lot

Best regards

Laurent

Can you share the code you use, and also the triggers + tag configurations?

Hi Philippe,

Thanks for your feedback ;

In the source code, the Event is sent with :

_paq.push(['trackEvent',"category-test-console","action-test-console","label-test-console","1"])

(the values are just tests)

MTM side:

  • The Trigger is a simple Custom Event trigger, based on a ‘pageview’ Datalayer.Event
  • The Tag ‘Pageview’, is a simple Pageview Type Tag, with a Custom Title

I’ve also tried to execute a test _gap.push directly in the console, and I also see the 2 matomo.php calls with the Event.

best rgds

I was writing about the matomo bootstrap(s)…
I think maybe you added the JavaScript tracking bootstrap code and also the MTM bootstrap code… Then probably the _paq event is trapped by the 2 defined trackers…
→ remove the JavaScript tracking bootstrap code

OR:

Just track with the MTM :wink: