guillaumeparis2000 / react-piwik

Library that allow to connect piwik with the react-router and track custom events
31 stars 17 forks source link

The tags only apply when setting a custom jsFilename but an error is logged in the console #50

Open Nureckiy opened 2 years ago

Nureckiy commented 2 years ago

After configuring the tag with a Tag Manager (hotjar in my case), it doesn't work by default until jsFilename is set to "https://\<mydomain>.containers.piwik.pro/\<siteId>.js". Then it works fine, but siteId and setTrackerId are added twice to the _paq variable and the following errors are logged in the console: The method setTrackerUrl is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation The method setSiteId is registered more than once in "_paq" variable. Only the last call has an effect. Please have a look at the multiple Piwik trackers documentation

Any ideas how to avoid this? Thanks in advance!