Tracking 2 Site IDs with Tag Manager

We want to change our approach from Matomo tracking to Tag Manager to benefit from the additional features.

Due to customer requirements, current tracking data is saved in two site IDs: the published live page (1) and the pages per market (2, 3, 4, 5, etc.).
That way we can provide customer HQ overall live data, and market editors get insights in the tracking data just of their market version.

How can we implement that in Tag Manager?

  • We prepared a general page view trigger
  • We prepared variables per site ID (live page, market versions)
  • We prepared tags
    But we cannot combine variables for 2 IDs in variables or tags

Do we need to inject custom JS to push the data to both IDs?

I’m thinking of filtering the trigger via URL path. Maybe this way I can trigger page views of different URL paths and send data to more than one site ID which is set in the variables:
1 trigger for → sends data to ID (1)
1 trigger for → sends data to ID (2)

My understanding is that both triggers should fire if there is a page view of
Unfortunately I have to wait for the next deployment before I can test it :wink:

Thanks a lot and regards

Hi @Thorsten.Michel
It is possible to do so:

  • Create one Matomo configuration variable for each Matomo ID…
  • Duplicate the tags you need to “send” to both Matomo IDs, but just change the Matomo configuration variable used for the other Matomo ID.

Unfortunately, I don’t see another way than duplicating tags… :worried:

Thank you @heurteph-ei

This means that we would have to create a lot of variables and tags. On the other hand, in the future we would be independent of deployments for the maintenance of new site IDs :slight_smile:

Hi again, @Thorsten.Michel

Tags yes, but variables no: just one per ID (then 2 in your example)

Unfortunately, there are 40+ market versions. But as mentioned before: this will save us dev resources in the long run.
I just hope this amount doesn’t affect the performance