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.

This topic contains 6 replies, has 2 voices.

Last updated by Itamar 2 months, 1 week ago.

Assigned support staff: Itamar.

Author Posts
August 7, 2019 at 12:04 pm #4354737

jeppeS-3

Tell us what you are trying to do?
I am trying to track usage and ecommerce with Analytics on both WoodUpp.dk and WoodUpp.com. I have setup WPML to use .dk for the danish website, and .com for the english website.
I am using the Tatvic EE plugin to integrate Analytics into the webshop with gtag i think.
I would like to grant you admin panel access to the webshop, but i am unsure where to provide this information, for a safely transfer to you.

Is there any documentation that you are following?
I have been trying https://wpml.org/forums/topic/setting-up-cross-domain-tracking-of-google-analytics/
And also https://wpml.org/forums/topic/google-analytics-doesnt-work-with-different-domains-per-language/
But my knowledge falls short on both topics. So i need your assistance to get further.

Is there a similar example that we can see?
I have no examples.

What is the link to your site?
Danish: hidden link
English: hidden link

August 7, 2019 at 5:21 pm #4357129

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Are you referring to this plugin?
hidden link
What is actually not working for you?
I'm not familiar with the Tatvic EE plugin so it would be helpful for me to know how it integrates Google Analytics on your site.

When you open a new thread you also have the option to add access to your site. If you add it in the correct place is not in the thread itself then it only you and us at the support team can see that. I'm enabling now a private message for the next reply.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- - Please make a backup of site files and database before providing us access. --

Thanks,
Itamar.

August 8, 2019 at 10:00 pm #4366185

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for the access details.

I've checked things on your site.

The Tatvic EE plugin is not officially compatible with WPML. You can he full list of compatible plugins here. https://wpml.org/documentation/plugins-compatibility/. Not being on this list does not mean that it is not compatible; it just means we do not know yet if it is. Nevertheless, I couldn't find the GA code for translation.
Do you need to use the Tatvic EE plugin of other things than inserting the GA code in the header?
I ask this because by adding the following code to the header.php file of your theme (before the </head> closing tag, you can achieve the same. With this code you would get the correct GA code for each language.

<?php if(ICL_LANGUAGE_CODE=='da'){?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
ga('create', 'UA-78239548-1', 'auto');
ga('send', 'pageview');
   
</script>
<?php } elseif(ICL_LANGUAGE_CODE=='en'){?>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   
ga('create', 'UA-78239548-3', 'auto');
ga('send', 'pageview');
   
</script>
<?php } ?>

Please let me know if thisi nfromation is heplful to you.

Regards,
Itamar.

August 11, 2019 at 12:46 pm #4376975

jeppeS-3

Thank you. Visits are being tracked now. But no eCommerce is being tracked - neither on .com or .dk - would you know how come?

August 12, 2019 at 3:12 pm #4381821

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Can you please elaborate what exactly needs to be tracked?
Please understand that I'm not familiar with Google analytics tracking.
Is the problem occurring in the Danish or English language?

Regards,
Itamar.

August 14, 2019 at 11:14 am #4394461

jeppeS-3

It is occuring in both languages. I need to track eCommerce, like orders, conversion paths, etc.

I will try to use a compatible analytics plugin (either Google Analytics Dashboard for WP or Google Analytics for WordPress by MonsterInsights).
I will return with my discoveries 🙂

August 14, 2019 at 9:18 pm #4397579

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

OK, I'll wait for your update.

Note: I'll be able to reply here early next week.

Thank you for your patience.
Itamar.

The topic ‘[Closed] Need to track visits and ecommerce on two separate domains: .com and .dk domain’ is closed to new replies.