Best practices for duplicating data to two different site id's

I have a client with huge number of websites to track.

I want to have single site data and global rollup (with custom dimensions). For this, I need to send data to two different site id’s.

  • local site id
  • global site id (“manual roll-up”, bc I need those custom dimensions)

So basically I want to do this - https://developer.matomo.org/guides/tracking-javascript-guide#multiple-piwik-trackers - but with the Tag Manager.

Any best practices for this kind of scenario with the tag manager?

we had the same issue with a client and we were only able to come up with a workaround:
For each website, we created a new Matomo Tag Manager container.
Then in the Matomo Tag Manager for each website, we created a new Matomo Analytics tag. In the configuration for the tag, we set the “Matomo Config” to the ID of the respective website.
In the website’s HTML we included both Matomo Tag Manager container codes. This solution would send tracking data to both the local site and the global roll-up.
Not the best solution ever (it does increase load time a bit) of course, it would be nicer to have only a single container to do this.

Hi @mikkop
A solution could be to create 2 configuration variables (one for each site ID).
Then you have to duplicate tags that must be in each “site”. Duplicate tags must be triggered on same triggers.