# Share tag manager container over multiple sites

**URL:** <https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687>\
**Category:** Data collection and tags\
**Created:** [February 27, 2023, 2:27pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687 "2023-02-27T14:27:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmeekers](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/rmeekers/32/929_2.png) [@rmeekers](https://community.piwik.pro/u/rmeekers)\
**Post date:** [February 27, 2023, 2:27pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/1 "2023-02-27T14:27:15Z")

</div>

I have 4 websites running on the same platform / environment.  
They have different tracking codes.

Their tag management setup is 99,9% identical. The only difference is the Piwik Pro Analytics tag.  
Is there a way to use a single container for those 4 sites?  
It doesn’t seem to be possible.

If it’s not possible, I have to maintain tags in 4 containers meaning that I have to do every little change 4 times.

---

<div class="post-metadata">

**Author:** ![kuba](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kuba/32/7_2.png) [@kuba](https://community.piwik.pro/u/kuba)\
**Post date:** [February 27, 2023, 5:06pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/2 "2023-02-27T17:06:13Z")

</div>

Hi @rmeekers,

today we released meta setup in tag management. See this doc: [About a meta setup in Tag Manager | Piwik PRO help center](https://help.piwik.pro/support/tag-manager/about-meta-setup/)

So you keep your current setup as is when it comes to the Piwik PRO tracking tag. All other tags can be configured in a meta site containing all the mentioned sites.

---

<div class="post-metadata">

**Author:** ![rmeekers](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/rmeekers/32/929_2.png) [@rmeekers](https://community.piwik.pro/u/rmeekers)\
**Post date:** [February 27, 2023, 6:21pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/3 "2023-02-27T18:21:59Z")

</div>

Thanks @kuba  
I’m a lucky guy today!

---

<div class="post-metadata">

**Author:** ![rmeekers](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/rmeekers/32/929_2.png) [@rmeekers](https://community.piwik.pro/u/rmeekers)\
**Post date:** [February 28, 2023, 11:58am UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/4 "2023-02-28T11:58:18Z")

</div>

Question @kuba  
I’ve noticed that I can use variables from the meta site in the real site container although autocomplete is not working. The article doesn’t mention this explicitly, but can you confirm that I can use it this way and that there is no need to duplicate variables in a site container for use in site tags?

---

<div class="post-metadata">

**Author:** ![kuba](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/kuba/32/7_2.png) [@kuba](https://community.piwik.pro/u/kuba)\
**Post date:** [February 28, 2023, 12:02pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/5 "2023-02-28T12:02:14Z")

</div>

The tag trees for both metasite and site are merged. So, effectively, variables should work. Since it’s the first version of this feature, there are missing parts. I presume that you see valid use cases for using variables like that. I’ll fill in feature request to add autocomplete in this case.

---

<div class="post-metadata">

**Author:** ![rmeekers](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/rmeekers/32/929_2.png) [@rmeekers](https://community.piwik.pro/u/rmeekers)\
**Post date:** [February 28, 2023, 12:03pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/6 "2023-02-28T12:03:14Z")

</div>

ok thank you. I’ll collect feedback if I come across

---

<div class="post-metadata">

**Author:** ![thomasgerstmann](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/thomasgerstmann/32/864_2.png) [@thomasgerstmann](https://community.piwik.pro/u/thomasgerstmann)\
**Post date:** [February 28, 2023, 12:09pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/7 "2023-02-28T12:09:53Z")

</div>

great news!

we have also such a multi site / multi regions setup here with different tag manager containers.

will try this out soon, too.

---

<div class="post-metadata">

**Author:** ![rmeekers](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/rmeekers/32/929_2.png) [@rmeekers](https://community.piwik.pro/u/rmeekers)\
**Post date:** [May 31, 2023, 2:48pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/8 "2023-05-31T14:48:18Z")

</div>

@kuba I do have some feedback after I’ve set it up for another customer:

- variables that exist only on the meta site can’t be used in the triggers of the site
- triggers that exist only on the meta site can’t be used in the tags of the site
- it’s not clear what happens if the same variable exist in both the site and the meta site =\> from what I can see is that the tag from the site level has priority (=good)

---

<div class="post-metadata">

**Author:** ![Maciej\_Kowcun](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/maciej_kowcun/32/787_2.png) [@Maciej\_Kowcun](https://community.piwik.pro/u/Maciej_Kowcun)\
**Post date:** [May 31, 2023, 5:35pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/9 "2023-05-31T17:35:15Z")

</div>

Hi @rmeekers, thanks for the feedback.

> variables that exist only on the meta site can’t be used in the triggers of the site

It may work. However, there is currently no autocomplete. It is the first version of the mechanism, and we plan to modify it. As a result, triggers in sites relying on variables from meta sites may eventually stop working.

> triggers that exist only on the meta site can’t be used in the tags of the site

Can you provide a specific use case where this can be useful? Why is copying a trigger from meta site to site not good enough?

> it’s not clear what happens if the same variable exist in both the site and the meta site =\> from what I can see is that the tag from the site level has priority (=good)

Yes, if a variable exists in both site and meta site, the one in the site takes precedence. We will update the description on Help Center to make it clear.

Do you need a more complex mechanism that would allow you to control the order of firing all tags in both site and meta site and mix them?

---

<div class="post-metadata">

**Author:** ![Maciej\_Kowcun](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/maciej_kowcun/32/787_2.png) [@Maciej\_Kowcun](https://community.piwik.pro/u/Maciej_Kowcun)\
**Post date:** [May 31, 2023, 7:10pm UTC](https://community.piwik.pro/t/share-tag-manager-container-over-multiple-sites/1687/10 "2023-05-31T19:10:45Z")

</div>

> [@Maciej\_Kowcun](#):
>
> > variables that exist only on the meta site can’t be used in the triggers of the site
> 
> It may work. However, there is currently no autocomplete. It is the first version of the mechanism, and we plan to modify it. As a result, triggers in sites relying on variables from meta sites may eventually stop working.

To be precise, we want to modify it to make variables from meta sites available in sites, but probably there will not be backward compatibility with current setups.
