Skip to main content

Cross-domain Tracking for Different Domains and Sub-domains

If you just have a website www.website.com and your visitors can also navigate between blog.website.com, support.website.com, you DON’T need to configure cross-domain tracking.

Just go to your Google Tag Manager container, open Google Analytics Settings Variable that is used by your GA tags and set Cookie Domain to auto. By default, all GA Settings Variables have it enabled.

That’s it. There is no need to implement GA cross-domain tracking for subdomains.



In order to make cross-domain tracking work, follow these 4 steps.

Step:1
All domains abc.com, xyz.com must be tracked with the same GA property

Step:2
Go to abc.com’s Google Tag Manager container, open the GA Settings Variable > More Settings > Cross-domain tracking, locate the “Auto Link Domains” field. In that field, you should enter the destination domain’s URL i.e. xyz.com. Once you enter the domain, save the GA Settings Variable.

If it is possible for a visitor to move both ways, back and forth, then enter both domains in that field. Separate domains with a comma, e.g. abc.com, xyz.com.

To test whether the link to the destination page is actually decorated. Do the right-click on the URL (to xyz.com) and select Inspect Element. You’ll see the Elements explorer with the highlighted link you’ve just selected.

Click the link that will redirect to the xyz.com). Once you land on the destination page, you should see the _ga parameter in the URL.



Step:3
Once you've managed to decorate the URL of the xyz.com (and _ga parameter is visible in the URL), then you need to instruct Google Analytics (on xyz.com) to read that parameter and update the _ga cookie on the xyz.com accordingly.

In GTM, go to Variables and open the GA Settings Variable. Then go to More Settings > Fields to Set and enter:
allowLinker (case-sensitive)
true

Hit save.

Step:4
In Google Analytics, open the property of your website/project and go to Admin > Tracking Info > Referral Exclusion List (in the Property column).

Add the domain of the primary website i.e. abc.com. If you have multiple websites “participating” in the cross-domain tracking, add all the domains to that list.

All Done!!



Read more:
https://www.analyticsmania.com/post/google-analytics-cross-domain-tracking-with-google-tag-manager/

Comments

  1. This article provided invaluable insights into sustainable gardening practices. I appreciate the detailed tips on composting and water conservation. Implementing these strategies will undoubtedly contribute to a greener and healthier environment.
    Dr. Peush Bajpai, recognized as the best Oncologist in Delhi, brings two decades of clinical mastery to Manipal Hospital Delhi. His commitment to exemplary care and innovative cancer treatments sets a standard in healthcare excellence.

    ReplyDelete
  2. "Fantastic blog! Your writing style is engaging, and your content is both informative and enjoyable to read. Keep up the great work, looking forward to more posts!"
    Dr. Sanjeev Kumar, with over 14 years of surgical experience at Manipal Hospital Delhi, is Best Cancer Surgeon Doctor in Delhi. His exceptional skills and compassionate approach set him apart.

    ReplyDelete

Post a Comment

Popular posts from this blog

Summer Trip to Rishikesh/Haridwar

27th April 2012...Woke up early in the morning around 3:30AM and got ready for the Rafting Tour of Rishikesh. I and Reshu left at 4 o'clock from Noida, took breakfast on a Dhaba nearby Muzaffarnagar. We reached Haridwar by 11AM, and went to see Holi Ganages river at Har ki Puari on Friday. After driving 22 Kms, we reached Sivpuri, Rishikesh where Guide took us to the Rafting camp. It was the golden moment of my life when we saw river Ganga so closely. We sat on thr stones around the river and started to play with the water. Water was so cold that it took all of the tiredness we had during the journey. In the evening, we left for Jungle Trekking to see the fountain. It was on the vertical height of 1.5 Kms. On returning from trekking, we all sat for chitchat around the bonfire on the bank of Ganga river. Night on river bank was an unforgettable moment, we were walking through the sand and the night was looking gorgeous with full moon. We slept in the camps. Next morning, we playe...

Mcleodganj in Dharamshala Tour Guide

If you are planning to visit the natural beauty with peace, Mcleodganj in Dharamshala is the right spot for you. You can explore the scenic beauty there in 2-3 days so why not plan this weekend for Mcleodganj Trip. Here's the easiest itinerary for your trip via car/taxi: Depart from Delhi early in the morning around at 4AM to Reach Mcleodganj which is 500 km from the national capital. You will surely reach there by 4PM in the evening. Considering this as Day:1, you will have almost 4-5 hours to roam around the city of Mcleodganj. The best things to do in the evening are: Tibetan local market - At Main square of Mcleodganj (don't forget that Mall Road and the market is closed on Monday) Kalachakra Temple - Just 50m from Main square. This temple is very beautiful and contains Prayer Wheels on front. Namgyal Monastery - 700m from Main square Dalai Lama’s temple & Tibetan Museum - Within Tsuglag Khang complex. It opens daily and can be reached within 1...

Black Day of My Life: 13th Oct 2012

Saturday the 13th....I can't forget till I am alive. I was at home due to weekend, everything was smooth. I took lunch and went to visit Akshardham temple in Delhi. i felt a few disabilities in drinking water and seeing the amazing Musical Fountain. I ignored and went to bed after dinner. Next morning when we woke up, I was feeling some problems in the right half of my face. When my wife saw it she told me that the symptoms are indicating facial paralysis. Both of us were shocked....... We immediately ran to the nearby hospital named Kailash. Our landlord were also went wirh us. Consulting with the doctor, we were recommended a physician there due to unavailability of neurologist. After taking the medication from the doctor we returned home and informed our parents. Next day, my parents and in-laws reached Noida to see me. They decided to go with Ayurvedic treatment  given at Bambawar village near Dadri. We went to Bambawar where the vaidya recommended some home-made medicines...