Container structure on International websites

Hi,

We have currently an international website(SPA site) where we have implemented a Piwik Pro Container(with tracking code) according to this guide with help of GTM. This container is implemented for a specific locale of the site for testing before launching on the whole site, e.g www.example.com/de.

Good to know, it’s a website built on reactJS.

Because visitors can navigate to this locale from other parts/locales on the site without the page reloading we have decided to trigger the tag in GTM with the container code for every page view(SPA).

This setup creates an error that we noticed in the console when the container tries to initialize a second container on the visitor’s second page view and so on, see the image below:

The idea for this international website is to later on set up containers for a Meta Site and multiple Sites for all the different locales and have the container code on the site instead of pushing it with help of GTM.

TLTR/My Question: What is the best way/best practice to structure containers for international websites and to avoid container loading errors?

Hi @Dataguy ,
Since the website is a SPA, the container should only be initialised on actual page views (when page reloads). Unfortunately that makes it impossible to report to eficiently track different language versions under different properties. Did you consider tracking it all under a single property and using an event-scoped custom dimension as a differentatior for reporting?

1 Like

Hi @pslonina ,

Ok, thanks! Just so I understand you correctly… with event-scoped custom dimension or a session-scoped custom dimension as a differentiator for reporting, we would use segments/create custom reports for viewing reports(like in our case) data for the different locals?

Hi @Dataguy exactly, however I’d recommend using event-scoped cutom dimension, since we would need the locals information on every pageview.

1 Like