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 All

 

Looking for a bit of advice.

There has been a couple of sites set up (before I started) and was wondering if this would cross domain track correctly

 

The main site has the code

 

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-3476376-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

 

 

The secondary site has the code

 

ga('create', 'UA-3476376-1', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['cooperbmw.co.uk'] );
ga('send', 'pageview');

ga('create', 'UA-64878654-1', 'auto', {'name': 'secondTracker'});
ga('secondTracker.send', 'pageview');

 

The secondary site links back to the main site (it opens in a new tab) does this have any effect on the tracking

 

Many Thanks

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author InchcapeDigital
January 2016

Re: Cross Domain Tracking

Top Contributor
# 4
Top Contributor

Hi Sophie,

 

You need the universal analytics code on both domains in order to make cross domain tracking work.

Cross domain tracking has changed in analytics.js and is not compatible with cross domain tracking in ga.js. Both the source and destination domains need to be using the same code in order to track user interactions across them in a single session.

https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#cros...


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Cross Domain Tracking

Top Contributor
# 2
Top Contributor
Hi Sophie,

You need to update your tracking code on the main site to Universal Analytics.
Please check the document below for setting up cross domain tracking:
https://support.google.com/analytics/answer/1034342?hl=en#GA
Let me know if you have questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Cross Domain Tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Hi Arnold

Thanks for your reply but I am trying to understand what is happening on the sites at the moment.

I know at some point I need to move to Universal but I am trying to understand if the sites are doubling counting visits or not.

Hope you can help me?

Many Thanks
Marked as Best Answer.
Solution
Accepted by topic author InchcapeDigital
January 2016

Re: Cross Domain Tracking

Top Contributor
# 4
Top Contributor

Hi Sophie,

 

You need the universal analytics code on both domains in order to make cross domain tracking work.

Cross domain tracking has changed in analytics.js and is not compatible with cross domain tracking in ga.js. Both the source and destination domains need to be using the same code in order to track user interactions across them in a single session.

https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs#cros...


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Cross Domain Tracking

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi

I have a clarification regarding cross domain tracking

From a new microsite with a different domain name Visitors would land on my main domain.

I have GTM on my main domain and i have updated the cross domain variable to include the new microsite domain name and all the allowlinker is set to true and it is firing on all pages.

Now on my microsite i have added the below tags

ga('create', 'UA-xxxxxxxx-x', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['main domain name alone] );

I could see the _ga=1.98408732.2092043187.14556416 getting appended when visitors from microsite land on my main site. However in Goals i dont see the microsite data (which is step 1) and all i see is the main domain data (Which is step 2 & Step 3)

Any help ?

Re: Cross Domain Tracking

Rising Star
# 6
Rising Star
Hi Sophie,

The info you provided is a little incomplete but that said, Arnold is correct about mixing tracking technologies. Also ga.js requires all kids of special coding on the links and forms that cross the domains so ditch it ASAP.

To answer your question about traffic that moves cross domain: Yes if you are rolling up stats from both sites, you would be double counting sessions and users for anyone that crossed between them. So even though you have a common tracker UA-3476376-1, the moment you traverse the chasm between the two, a new session would begin and you inflate your counts.

Hope that helps,

Best,

Theo Bennett
Analytics Evangelist at MoreVisibility | Contact Me
Connect on LinkedIn

Re: Cross Domain Tracking

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hello,

Sorry for using this post, but for some reason I can't open a new one! I would like to ask you if there is a filter or something to help us set the direction of the traffic only from one site to another and not the other way round. In our case, we have around 50 pages that work independently and they lead to 5 pages where the conversion happens. The problem is that these 5 pages function as a separate business and have their own traffic, which doesn't lead to any of the 50 pages. Therefore, we would like to link all 55 pages, by using one GTM container and one analytics code, but in Analytics we would like to specify that we only want to get the traffic from the 50 pages to the 5 conversion ones and not the opposite.

Thanks in advance!