Cross domain tracking Google Analytics
-
Hi there,
Got a question on cross domain tracking:
We have a couple of TLD's to serve localized content to our visitors, next to our main .com TLD where our app is running as well in a subdomain. Situation is this:
Local sites:
marketingsite.be
marketingsite.com.br
marketingsite.frMain site: marketingsite.com
app.marketingsite.comConversion gets triggered when somebody ends up in app.marketingsite.com/firstuse for example. People can sign up at the local site filling in their email but they end up in app.marketingsite.com/firstuse
Reading this article on cross domain tracking I'm getting a bit confused on the setup of the tracking code itself. The sample code provided shows these two lines:
ga('require', 'linker'); ga('linker:autoLink', ['maindomain.com','targetdomain.com']);
Now the question
Is it correct when I think that maindomain should be replaced with our local TLD's on every one of those, and that targetdomain is where the conversion happens? In this case the .com site?
-
Daniel's answer looks on point to me. Did you get this resolved Joris?
-
Hi Joris,
Analytics.js uses a cookie that is not shared with other domains (subdomains are ok) so in order to track users across multiple domains there are two sides to be managed:
- At the source domain: pass the cookie data to the destination domain.
- At the destination domain: handle the cookie data received from the source domain.
In your case, source domains being your local domains and destination domain being your main domain.
You can accomplish this in a symmetrical fashion for all the domains involved by adding the code in this article from Google help. If you want a one way solution then take a less generic approach: https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google Analytics / Facebook UTM
Hello, I have a quick question. I am setting up conversion tracking for my Facebook ads, so I am giving each ad set a tracking URL (UTM) in order to see which ads are converting etc. Is it possible to see on analytics how much I am spending on these ads or a cost per conversion? Or does the tracking merely track general analytics data such as bounce rate, exit rate, revenue generated etc? Kind Regards, James
Reporting & Analytics | | SO_UK0 -
Whats (Other) traffic in Google Analytics?
When I look through all our clients, a few are receiving the majority of their traffic from (other). [ Acquisition > Channels > (Other) ]. The only option in (other) is "website" or "offline", whatever that may be. And even weirder, the avg session duration is 0:00. Any idea what this may be?
Reporting & Analytics | | W2GITeam0 -
Search and Replace filter on Google Analytics?
Hello! On our GA account for one of our clients, we'd like to add a search and replace filter to the Views section of the account. The URL is www.askergoworks.com (it redirects to askergoworks.com), and Google has flagged us to have redundant hostnames. This is why we'd like to add the filter. Would the regular expression be askergoworks.com|www.askergoworks.com ? Any help would be great - I'm not a regex expert, so I really don't how to go about this. Thanks!
Reporting & Analytics | | AGILITY0 -
Google Analytics Set-Up for site with both http & https pages
We have a client that migrated to https last September. The site uses canonicals pointing to the https version. The client IT team is reluctant to put 301 redirects from the non-secure to the secure and we are not sure why they object. We ran a screaming frog report and it is showing both URLs for the same page (http and https). The non-secure version has a canonical pointing to the secure version. For every secure page there is a non-secure version in ScreamingFrog so Google must be ignoring the canonical and still indexing the page however, when we run a site: we see that most URLs are the secure version. At that time we did not change the Google Analytics setup option to use: "https" instead of "http" BUT GA appears to be recording data correctly. Yesterday we set up a new profile and selected "https" but our question is: Does the GAnalytics http/https version make a difference if so, what difference is it?
Reporting & Analytics | | RosemaryB1 -
Moving data between Google Analytics Properties
Last summer we setup another Google Analytics property for us with Universal Analytics and have been running this alongside the old Google Analtyics property. is there a way of exporting all the old data from the old property into the new Universal Analytics property?
Reporting & Analytics | | ese0 -
How to filter many cities from Google analytics
I need to filter hundreds of cities from my traffic reports. I've been told that adding them all in this format: |Knutsford|Ripon|Cheadle Hulme|Congleton| and using the 'matching reg/exp from the drop down should do it... Unfortunately that doesn't seem to be working as I can still see cities like London in the results.... Any ideas?
Reporting & Analytics | | david.smith.segarra0 -
Google Analytics for example.com and www.example.com
Hello. I have had a Google Analytics account set up to track the property www.example.com for several years. In Google Webmaster Tools, I recently set the preferred domain to example.com (without the www), and we put in a rewrite from www to no-www in the .htaccess file. Should I now change the url of the property in Google Analytics to example.com (without the www), or does Google Analytics see the two urls as the same? Thank you!
Reporting & Analytics | | nyc-seo0 -
Entrance keyword for specific landing page Google Analytics V5
Hi all I cant seem to find a way to get Entrance keywords for a specific landing page in version 5 of Google Analytics. Any quick tips? Thanks a million Fredrik
Reporting & Analytics | | Resultify0