Two Containers Added But Some Events Are Triggering Twice

I was able to add 2 containers in my website all the events are working fine which are declared in Matomo Tag Manager but when i am triggering an event from my code it is triggering the event twice.

Have a look at the network activity. How does it look like?
How are configured your triggers and events (fir each container)?

Each are getting triggered for different routes one is for /x and other is for /y route and when i am running it with only one container the event are triggering fine but then that containers event which are defined in Tag Manager will not trigger.

Sorry, I don’t understand your configuration…
Can you share how you configured the two containers?

I have done like this inside script tag

var _mtm = window._mtm = window._mtm || [];
_mtm.push({‘mtm.startTime’: (new Date().getTime()), ‘event’: ‘mtm.Start’});

var d=document, g=d.createElement(‘script’), s=d.getElementsByTagName(‘script’)[0];
g.type=‘text/javascript’; g.async=true; g.src=‘’; s.parentNode.insertBefore(g,s); // Container 1
g.type=‘text/javascript’; g.async=true; g.src=‘’; s.parentNode.insertBefore(g,s); // Container 2

This seems good.

Are the last version of the containers well published?
In order to be sure: start to create new versions, and just check there is no pending update in the new container vs the previous version…

How are configured the two containers in MTM, especially the Matomo configuration variables, the triggers triggered twice and tags run trice?
Can you provide also the network activity (sent requests) when the events are sent twice?