Being able to track a website in two separate instances (without duplicating tracking in one instance based on the other) #22230
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
To Triage
An issue awaiting triage by a Matomo core team member
In some cases, websites have a Matomo tracking fired by one instance - let's call it instance A - owned for by a web agency for example.
But clients want to have their own tracking based on their Matomo instance (Instance B).
Today, if I install this tracking, the data is mixed because _paq object is the same for instance A and instance B.
How can we solve this issue without relying on :
/ Add this code below within the Matomo JavaScript tracker code
// Important: the tracker url includes the /matomo.php
var secondaryTrackerUrl = 'https://analytics.example.com/matomo.php';
var secondaryWebsiteId = 77;
// Also send all of the tracking data to this other Matomo server, in website ID 77
_paq.push(['addTracker', secondaryTrackerUrl, secondaryWebsiteId]);
Because this implies that we will depend on somebody else's tagging plan, tracking config, etc.
Thank you.
Frederic
The text was updated successfully, but these errors were encountered: