Cross Domain Tracking with Universal Analytics and GTM - google-analytics

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?

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.

Should I use http or https for tracking links?

I want to build a service that helps people tracking their links. Visitors click on my link url.com/123, they will be redirected to the destination website as below:
Visitors in site A --> url.com/123 (301 redirect) --> site B
Should I use http or https for the link url.com/123 so that I and my customers (the owner of site B) can see the referring site (site A)?
🔒HTTPS. Always and forever.
Protect and offer privacy to your users. Ideally, your domain should use name servers that provide DNS over HTTPS.

analytics, url forwarding continue tracking old site

I rebranded my website and changed the domain name, I setup a forward at my web host.
So for example www.myoldsite.com forwards to www.mynewsite.com
In Google Analytics www.myoldsite.com is still getting lots of sessions, and www.mynewsite.com isn't, I don't understand why!

Google analytics how to track subdomains

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.

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