AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.2K members online now
2.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross Domain Tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

I hope someone can help me...

I have a website which has a specific mobile site as well we implemented some cross domain tracking see below

<script type="text/javascript">

(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-646863-1', 'auto', {'allowLinker': true});

  ga('require', 'linker');

  ga('linker:autoLink', ['m.skisolutions.com'] );

  ga('send', 'pageview');

</script>

 

and then added m.skisolutions.com to the referral exclusion list in the analytics.

We are now seeing some incorrect urls in the source/medium 

for example

british-columbia-ski-holidays/www.skisolutions.com

 

Where www.skisolutions.com is the main domain so it shouldnt be showing like this.

Is is this what self referring is?

 

I appreciate any help

Thanks

Hannah

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Hannah B
October 2016

Cross Domain Tracking

Top Contributor
# 4
Top Contributor

Hi @Hannah B - yes if you want to track both usage of m and www sites in the same property even in terms when users cross from www to m and vice versa in the same session place the same code on both sites. 

 

You can always create additional views to separate audience in terms of device category or site hostname. 

 

Kind regards,

Zorin

 

Web analyst @ escapestudio.net

View solution in original post

Cross Domain Tracking

Top Contributor
# 2
Top Contributor

Hi @Hannah B if you need to do cross domain between skisolutions.com and m.skisolutions.com then the only thing to do is:

ga('create', 'UA-646863-1', 'auto');
ga('send', 'pageview'); 

 

No need for linker as both sites reside on the same domain - the auto part makes sure of that. 

 

On the other hand british-columbia-ski-holidays/www.skisolutions.com is usually what happens if you add www.skisolutions.com inside view settings under default page - which should be empty.

 

Referral exclusion for both www and m should only contain skisolutions.com and other domains if applicable. 

 

Hope it helps. 

 

Kind regards,

Zorin

 

Web analyst @ escapestudio.net

Cross Domain Tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi 

 

Thanks for the reply

 

So if were tracking the mobile and desktop site is this the correct thing to do?

 

Should i add that code to both the desktop and the mobile site?

 

Thanks

Hannah

 

Marked as Best Answer.
Solution
Accepted by topic author Hannah B
October 2016

Cross Domain Tracking

Top Contributor
# 4
Top Contributor

Hi @Hannah B - yes if you want to track both usage of m and www sites in the same property even in terms when users cross from www to m and vice versa in the same session place the same code on both sites. 

 

You can always create additional views to separate audience in terms of device category or site hostname. 

 

Kind regards,

Zorin

 

Web analyst @ escapestudio.net

Cross Domain Tracking

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Great thank you so much for your help

 

Thanks

hannah