Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is trying to set up multiple Google Tag Manager (GTM) IDs for each domain on their multilingual site using WPML with multiple domains enabled. They could not find relevant information on how to configure multiple GTM IDs with WPML.
Solution:
We recommend adding different GTM IDs for each domain by integrating them directly into the site's code. This approach allows for separate tracking configurations for each domain, which aligns with having distinct marketing strategies per language or region. You can refer to the following forum posts for detailed guidance and examples:

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Dražen 1 month, 1 week ago.

Assisted by: Dražen.

Author Posts
February 19, 2025 at 2:02 pm #16725015

dennisv-7

Background of the issue:
I am trying to set up multiple Google Tag Manager (GTM) IDs for each domain on my site, super-seat.com, super-stuhl.de, super-chaise.fr and super-seat.co.uk, using WPML with multiple domains enabled. We have different tag IDs for each domain.

Symptoms:
Could not find any relevant post about setting up multiple GTM IDs with WPML.

Questions:
How can we set up multiple Google Tag Manager IDs with WPML multiple domains enabled?

February 19, 2025 at 3:45 pm #16725712

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Thank you for contacting WPML support. While you are waiting for one of my colleagues to take this ticket and work on it, let me provide you with first debugging steps or if I can perhaps help with the issue quickly.

Please take a look at this reply in the forum. It addresses your use case:
https://wpml.org/forums/topic/using-google-analytics-with-multiple-domains/#post-8674645

To ensure the quickest and most accurate support, please provide your debug information so I can look at some of your configurations. We have an excellent article on how to locate it here: https://wpml.org/faq/provide-debug-information-faster-support/.

Best Regards,
Otto

February 24, 2025 at 11:07 am #16740399

dennisv-7

Hello Otto,

The link "https://wpml.org/forums/topic/how-to-add-the-google-analytics-for-2-languages-domains/#post-891674" is not found. I cannot find the solution from this forum. Can this page be restored or is the info found on another page? Or do you recommend an option/plugin to do this?

February 24, 2025 at 3:57 pm #16742041

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hi,

It's weird, I can open the link 🙁

Let me paste the content of Marcel's reply here, as I think it's relevant to your case:

Hi,

Thank you for contacting WPML Support.

Which method makes sense depends also on your business and marketing strategy. If you prefer to separate the stats for each domain completely, add 2 property IDs via code as mentioned here: https://wpml.org/forums/topic/how-to-add-the-google-analytics-for-2-languages-domains/#post-891674. This method is more asked here in our forum and many clients are integrating Google Analytics and even Google Tag Manager this way.

Here, you can find a good explanation of the Vies method: https://wpml.org/forums/topic/implement-google-analytics-on-mulitlanguage-wordpress-website/#post-1282022

Google itself describe the way of using different properties: hidden link

If you have further questions, I recommend getting in touch with a certified WPML consulter which offers SEO best practices: https://wpml.org/contractors/

Best Regards
Marcel

February 24, 2025 at 4:35 pm #16742247

dennisv-7

Hello Otto,

I can open the forum page you sended. But I cannot open the link inside the content of Marcel's reply (https://wpml.org/forums/topic/how-to-add-the-google-analytics-for-2-languages-domains/#post-891674). So I cannot check that solution Marcel sended to Joshua.

February 25, 2025 at 9:10 am #16744529

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

you can add a simple code to add 2 different GA code for each language, for example, please check the next ticket:

https://wpml.org/forums/topic/how-to-setup-ga4-analytics-using-different-domain-per-language/

Regards,
Drazen