multiple domains, how to use the same GA property - google-analytics

I am trying to implement cross domain tracking for two of my domains. While reading the Google Docs on the matter, I got confused by the following paragraph toward the end of the article (bold text):
Both domains need to use the same GA property in order for cross-domain tracking to work correctly. If the sites use different properties, no session information will be shared and cross-domain tracking will not work.
Cross-domain tracking supports multiple trackers, but be aware that they will all share the same Client ID used by the linker.
The scenario I have is:
example.com --> the first domain used to promote my product
domain2.com --> the second domain which is used for secure checkout.
When creating a properly in Analytics, I need to enter the default url. How can I set this up so that I can then use the same property code for both domains?
Can't find any other related questions or articles on this, so I feel I am missing something simple.

It means that you have to use the same UA ID on both sites so that the GA property can collect the data on those 2 sites. You should use GTM to do cross domain tracking since it is much easier to set-up.
I recommend following the instructions here http://www.lunametrics.com/blog/2015/06/16/cross-domain-tracking-with-google-tag-manager/

Related

Can you implement google analytics with no domain binding?

We have a web service which is installed on different stations. Each has a different ip and domain. we want all of them to report to the same suite.
Can this be done?
The JavaScript tracker for Google Analytics can be used if you allow calls to the Google Servers, if you allow your clients to execute JS and either can set cookies or provide a client id in some other way (must not be personally identifiable data).
If you cannot use Javascript then you could still collect data via the measurement protocol, although this might require substantial development effort.
The domain setting in the Google Analytics interface does not affect data collection, it is used in the (soon to be removed) in-page analytics feature and as base url for the "open document" feature in the behavior reports.
Google Analytics does not collect by domain, but by property ID (UA-XXXXXXX-X), else cross-domain tracking would not be possible (it is actually a documented feature).
Cross domain tracking would be important if somebody could hop from one of your stations/domains to the other and you wanted this to be tracked as a single session. This does not seem to be your use case.
The only pitfall is that the reports display page paths, not full URIs. So if you have similar paths on all your stations the metrics for the page paths will be lumped together unless you do a breakdown by hostname. A common workaround is to add a filter to your data view that prepends the hostname to the path, or to provide custom paths in the first place.
But basically this is not a problem. If you do not need cross domain tracking you'll be okay if you dump the same tracking code in all your sites.

Is Google's Documentation Correct on How Cross-Domain Tracking Works?

Researching options for Universal Analytics to setup cross-domain ecommerce tracking. Project has 3 existing separate Google Analytics Accounts for 3 domains, not setup for cross-domain tracking currently. Setting up Universal Analytics to track conversions across those multiple domains from original traffic course to cart conversion.
I have done this before for other funnels using separate Property IDs for each domain, so was surprised to read this in the Google Docs for Universal Cross-Domain tracking:
"Both domains need to use the same GA property in order for cross-domain tracking to work correctly. If the sites use different properties, no session information will be shared and cross-domain tracking will not work." [my emphasis]
When you autolink, you pass the _ga parameter, and it seems like this works across multiple accounts (or across multiple properties) to connect (for instance) PPC campaigns > domain 1 to eventual revenue > domain 2 (or 3, etc.).
So, what is being said here? Is it just plain wrong, or something that I am missing about sessions? For multiple domains, is your experience implementing this that a rollup property is required? Or preferable in some way?

Cross Domain Tracking - see original source in Real-Time Reports

I have set up Cross Domain Tracking for two different domains with two different GTM containers. I added both domains, a.com and b.com in the Auto Link Domains in both Universal Analytics tags, set Allow Linker for both to true and set Cookie Domain to auto. However, when I'm surfing from Facebook to website a.com and click through to b.com I see a.com / referral as a traffic source in the real-time reports in Google Analytics. This should be Facebook in this case right? Does someone have a method to debug this issue?
Thanks!
Use Referral Exclusion List in Property Tracking info. This will exclude traffic from a.com from referrals.
Possibly you are not a Google Analytics Premium member?
The second thought is maybe you are using two Google Analytics properties (one for each domain) and not using one property for both domains?
To be able to utilize the cross domain function you must have one Google Analytics property associated to all domains. You might have the results of funny "referral sources" because you are using two different properties (UA-1111111-1 and UA-2222222-2.
Read more about multiple cross domains
Or for specific cross domain info (notice the part about "UA PROPERTIES)
Let me know if that is the issue, and what your next strategy might be.

Setting up google analytics for different domains

I have a web site that several parts are hosted in a different name server. but they are practically the sub parts of the same sites. (i know it's badly designed)
Currently, i get analytics data for each domain. but what i don't like about that is when you are jumping to the other domain, it marks as a drop off. Is there anyway that i could setup analytics in such a way that it treats both domains as a single website?
You are looking for cross domain tracking. Google has quite extensive documentation on this. Follow the instructions for Cross Domain Autolinking, manual linking is usually unnecessary and somewhat error prone.
The basic idea is that, since the cookie that stores the client id is domain specific, the id that identifies users must be carried over in some way from one domain to another. This is done by putting it in the url, in a parameter named "ga". If the other domain is configured for cross domain tracking it will take the parameter from the url instead of generating it's own client id. When GA processes the data on the serverside it will recognize that the calls from the different domains (but the same client id) belong to the same session.
Google Analytics (via the autolinking plugin) provides functions that automatically "decorate" links and form, i.e. they add the ga parameter to the links that point to the linked domain, or to form actions. This works well with plain links and forms, but might not always work with javascript callbacks on the links that redirect instead of just following the link.

Google analytics for any domain

Is there any way to track analytics for for all domains except a specific one?
If I develop a tool that will be integrated in some websites, I don't know what is the domain to track, but I would track the access from any domain.
How can I do that?
The Google Analytics tracking code will work for all domains if you set the Cookie Domain to auto (or "none", but that has side effects that "auto" has not). You can then filter or segment by hostname to get data for individual domains.
However this is not the same as "cross-domain" (since you tagged your question with that). Cross domain tracking means "tracking multiple domains as one property", so GA sessions will be maintained even when crossing domain boundaries. This is not relevant at all to your use case.
Maybe it would be better if you implemented tracking via the measurement protocol. If you simply add GA tracking code to existing websites you might break tracking that is already there, if you build your own solution on top of the measurement protocol you don't have to worry about that but you can still use the standard GA reporting interface.

Resources