Track events on react

Hi everyone,

My company is developping a new module using react on my website (most pages of the this website are not react and the new module is running over the website), and I’m trying to track an event with the Matomo tag manager.

I created a new tag with Matomo analytics type and set up a trigger to fire when a specific element in this new module is clicked, but When I test this event (in a preview mode), it is fire twice. The first one has the website url (i.e. and second event has the module url (

How could I set up an event on tag manager and just fire the event in the just in the react module?

thank you