Analytics
5.1K members online now
5.1K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Am I using the right tracking code

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello Community,

we are running a shopify ecommerce store and the shop is bi lingual (arabic and english) and also has multiple geo associated domains .com , .ae etc..

 

We want to be able to track all the domains that we have in one master view under the www.fodakty.com

the domains that we have are www.fodakty.com, english.fodakty.com, www.fodakty.ae, english.fodakty.ae, fodakty.com, fodakty.ae, fodakty.myshopify.com

 

what would be the right tracking code for this ?  below is what we have on the site, is it correct?

 

"

(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-67698137-1', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['english.fodakty.com', 'www.fodakty.ae', 'english.fodakty.ae', 'fodakty.myshopify.com'] );
ga('send', 'pageview');

"

Re: Am I using the right tracking code

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆
It looks good, you can also use regex to define the autolinked domains. However you need to check that this works in practice.

I test cross domain setups starting with a url encoded source medium combo. I setup a filter in the real time view for those source medium then switch to pages view in real time. Next I check that as I navigate across domains the session is preserved across domains.

Good luck

Re: Am I using the right tracking code

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thanks so much for your response,Lost you on the why you test  for this. Can you further explain it but make it sound more englishy lol Thanks  Sent from Outlook Mobile

Re: Am I using the right tracking code

Follower ✭ ✭ ☆
# 4
Follower ✭ ✭ ☆
I test it because it can easily get broken and the auto linker plugin you use does not cover all the cases. I'll be writing a blogpost on how we test this in about a week.

Re: Am I using the right tracking code

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Perfect. If you can please notify me when you write that post. I'd highly appreciate it  Thanks again,Mohammed.  Sent from Outlook Mobile