Does Google Analytics track the traffic of multiple domains? - google-analytics

I have a website subdomain.domain.com. I created an analytics account for this and included the tracking code. Later I registered a new domain xyz.com and pointed to the same website subdomain.domain.com. In Google analytics report, will the analytics display the traffic from both domains or do I need to make some alterations?

Google Analytics tracks website traffic no matter what hostname is specified in the page URL. You can use the Hostname dimension in the content report to find out.
In your case, depending on the type of hostname redirection you may or may not see the xyz.com in your reports. When you navigate to the xyz.com in browser, pick any page and can see in your browser xyz.com - it will be tracked. If you can see subdomain.domain.com - the last will be tracked.
If you website is accessible via subdomain.domain.com and xyz.com - you may have an issue with cross-domain users and duplicated (inflated count of) users since GA cookie in a browser is set per hostname

I have the same situation where our URL has changed and we are now in a crossover period while both URLs are active.
Without changing the tracking code I am getting our stats as before but I cannot tell in the analytics reports which URL the visitor used to access the site. If that is not of concern to you then you don't need to update your tracking code.

There is a secondary dimension under Content called "Hostname", this will break out your traffic by whether or not it was visited from subdomain.domain.com or xyz.com

Related

Cross Domain Tracking through Embedded Content

I have cross domain tracking set up on my site, A.com so I can track conversions in my other site B.com in the GA for A.com .
But I have an iframe that I need to put on my site. It will embed a form that people will use to get to a link to my other domain (the one that is connected with cross domain tracking). That form is embedded from another domain, example.com. I was able to go into my dashboard on example.com and place my GTM code in the iframe.
Since that link will be embedded, it will no longer pickup the user, since the user will be technically coming from example.com and not my site anymore.
How can I track the users that go from A.com through the embedded form (example.com) to my other site, B.com?
Mainly I just want to be able to track user interactions on the embedded form, and conversion events on B.com.
If you can add your own code to the iframe (example.com), you can get it to talk to the parent domain (A.com) using the postMessage API:
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
If you set this up, you'll be able to track events on A.com as normal and then set up cross domain tracking with B.com.

Google Analytics Shows Referral path of just " / " when there should be a path. What might cause this?

I have a small but not insignificant segment of traffic coming from a third-party landing page creation tool. The pages live on their servers and ultimately drive users to pages on our site.
All the URLs of these landing pages start with a subdomain of the platform, i.e., view.platform.com. The source should be that subdomain, and that's correct.
Referral paths however should start with "/our-account" and then whatever we set as the URL slug for the page, so the referral path of anything coming from these landing pages should only be paths like /our-account/july-sale, which some of them are, but the bulk (40%) of the traffic with a source of view.platform.com has a referral path of just " / " (or Full Referrer Path of view.platform.com/ if you use that dimension).
I should mention that we only have a handful of these landing pages right now (like 3) so we know for sure that the traffic with no referral path is coming from 1 of 3 places, we just don't know which one in the case of 40% of the total landing page traffic.
view.platform.com just forwards to the main website for the tool, and there's no way any of this traffic would be coming from there naturally.
Why would anything after view.platform.com be stripped from Google Analytics? Anyone have any thoughts?
The landing pages are HTTP, and they're linking to our site which is HTTPS, but I read that shouldn't be a problem. It's only an issue the other way around.
The landing pages are also not traditional regular HTML pages, but rather generated by JavaScript.
The landing pages also use symlinks if that matters. Users navigate to them as view.platform.com/our-account/landingpage/ but then it turns into view.platform.com/our-account/landingpage/p/1
You can consult this https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy and double check which policy is applied in the originating document.
You can also check the requests in the network tab to check which referrer is set in the request headers
You can inspect the requests that Google analytics send to its server to check what is being sent.

Sitecore Analytics redirecting multisite solution

I have a multi-site solution with analytics enabled. When a user visits one of the other sites, it seems the analytics engine is redirecting the user to a different site.
I've read here that this can be caused by the Analytics.HostName containing the host for the site that the user is being redirected to. However, this setting is empty.
Here are the request and response headers:
This is associated to the setting "Analytics.HostName" in "Sitecore.Analytics.Tracking.config" file. You should leave this empty in a multisite solution.

Single Google Analytics for multiple domains with a single landing page?

I have a GoDadddy account with hosting and domains (I know,,, GoDaddy sucks...), but I currently have multiple domains pointing to the same folder, and it has a single PHP page with the GA tracking code for a single domain. Because all the domains point to the same folder in the hosting, I see all visits for all domains as they are for a single domain in the GA panel. Is there a way to find out which visits come from what domain?
Currently GoDaddy has 3 hosting plans. The only two that allows you to have multiple domains are Deluxe and Ultimate.
How you conduct the implementation will affect the way GA reports the data. Now I am going to make the assumption that you have access to all the domains you said you currently have.
This is what you need to do to track your traffic
Check if you are allowed to have multiple Domains.
If Domains are not registered in Godaddy, make sure that all domains and the Primary Domain are pointing to Godaddy DNS or nameservers.
Add all domains as 'addons' domains or additional domains to your hosting account making sure you have a separate folder for each domain.
In each Domain Folder, create a basic HTML (index.html) page and paste the Google Analytic code in the Head section. Repeat this for every Domain.
Create 301 redirects to your PHP page that has the same Google Analytic code that you used for all the pages in 4.
IN Google Analytics Report you should be able to see all the redirected domains show as 'referral'.
Note: Sometimes the redirect might take place before the GA script is loaded and therefore you will not be able to track the referral. If you really care about absolutely all the referral traffic data, I will recommend you to not use 301 redirect but let the pages load and place a JavaScript redirect with a 5 second delay.

Cross Domain Tracking with Universal Analytics and GTM

I'm tracking everything through Google Tag Manager.
So I have my main domain example.com and I have a landing page at my parter's domain landingpage.partner.com. This landing page is redirected to partner.example.com with a DNS CNAME redirect.
Without any customization the traffic from the landingpage.partner.com will be tracked as a referrer in Google Analytics.
What I want to do is to track the traffic from landingpage.partner.com as my own traffic. So I have setup the GTM according to the UA dev guide with the "autolink" features. I have tried to add both landingpage.partner.com and partner.com in the "Auto Links Domain" field. The traffic is still getting tracked as referred traffic.
How should I set this up in GTM, in order to track my traffic as my own and not as referred traffic?

Resources