Google analytics how to track subdomains - google-analytics

I am trying to track subdomains in google analytics tool. But I didn't found setting to on subdomain tracking under admin->tracking info

Subdomain tracking can be set up in how you specify your root domain when you create the tracker object:
ga('create','UA-XXXXX-Y', 'domain.com');
for example, will track domain.com as well as its subdomains.
According to this link: https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain
Tracking users across subdomains does not require any additional
configuration.

Related

How to track traffic from different subdomain as referral traffic in Google Analytics?

I'm looking to track traffic from example.com to subdomain.example.com because I need to know the source of traffic going to subdomain.example.com, and example.com is one of the multiple sources. However, analytics.js seems to be ignoring the same domains by default, because I don't see www.example.com in the referral.
example.com and subdomain.example.com are two different sites with two different tracking code and ID.
Does anyone know how to approach this? All of the articles online show how to exclude traffic from different subdomains, but not include.
Many thanks in advance!
The way to do your 'include' is by using the referral exclusion list. If you have a different GA id for the two sites, I suppose that you have different analytics properties for them. From the information you provide us here I suppose you can do the following.
Go to the admin tab on your www.example.com site. Under Tracking info - Referral exclusion list, add the 'www.example.com' and also change it in the property settings as your Default url.
Go to the subdomain.example.com property. Under Tracking info - referral exclusion list I hope you have the entry subdomain.example.com.
This should work as you will see referrals on your subdomain from example.com. And also you will see referrals in your tld from subdomain.example.com, If I did not understand your request correctly you can also check this article

Google Analytics. Force root domain to show as "external"

I have a website on a subdomain: sub.main.com which has nothing in common with the root domain "main.com".
When I try to view the referrals from the root domain - it isn't there.Somehow Google doesn't include it in referrals report, presumably because it's a root domain of my website. Is there a way to force Google Analytics to count the root domain as an external one?

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?

Does Google Analytics track the traffic of multiple domains?

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

Resources