[Resolved] How can we add multiple GTM for each domain?
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.
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?
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.
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/.
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?
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.
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/