Google Analytics 4 multi-site tracking

under one account is a very common request from our clients.

You can track:

  1. Subdomains automatically —all visitors to both dogs.example.com and www.example.com, with data for both showing in the same report view (profile)
  2. Subdirectories—only visitors to the www.example.com/dogs subdirectory in a separate report as if it were a single site
  3. 3rd-party shopping carts—visitors to your online store and to your shopping cart hosted on another domain
  4. Top-level domains—all visitors to two domains that you own, such as www.example-petstore.com and www.my-example-blog.com, with data for both showing in the same report view (profile)

You can find instructions on its website but they are quite general. A few years ago it was a most painful part of GA coding and most difficult to set up correctly.

  • The problem of multiple domains
  • How does cross-domain tracking work in Google Analytics 4? Steps 1-5.
  • Will Google Analytics track subdomains?
  • How to configure cross-domain tracking in Google Analytics 4?
  • Test the setup
  • Final words

Currently, after last years’ changes, it is quite easy to setup multi-site tracking in GA4.

The problem of multiple domain tracking

It is a workaround that allows webmasters/marketers/analysts to send user’s/visitor’s identifiers from domain A to domain B and preserve the session information. That way, the visitor is being tracked as the same person across multiple websites and domains by Google Analytics 4 tag.

In order for this to work, both websites must use the same GA4 data stream (a.k.a. same measurement ID).

Subdomain’s tracking

If you want to track different websites that belong to the same domain (e.g. blog.yourwebsite.com and www.yourwebsite.com), Google Analytics 4 will handle that automatically.

Step #1. Go to the Admin of Google Analytics > Data Streams and select web data stream

Google Analytics 4 multi-site tracking

Step #2. Go to Configure Data stream.

This is the place where you can add all needed domains for the multi-site tracking.

Google Analytics 4 multi-ste tracking - Data Stream

Step #3. Go to Configure tag settings

You will see many options to configure, but we will concentrate only on domains.

Google Analytics 4 cross domain tracking - configure tag

Step #4. Go to Configure your domains

Google Analytics 4 multi-site tracking - data stream - configure domains

Step #5. Add your domains

You can add there domains which can be tracked under the same container ID.  Google Analytics 4 will even suggest some domain which you own.

It is the place where you setup your multi-site tracking.

This will also affect your automatic outbound click tracking in Enhanced Measurement. Domains that you enter here will not be treated as outbound clicks anymore.

Google Analytics 4 - cross domain tracking

Test the setup of your Google analytics 4 multi-site tracking

Once you have saved your changes, wait for a minute or so and then go to your first website (let’s say it’s domainA.com). On that website, you will have to find a link that will redirect the visitor to domainB.com.

Click it. Once you are redirected to the 2nd domain, check the URL. It should contain the _gl= parameter with a lot of stuff.

I present below Cloudflare.com when you click “login”, you are redirected to another site with the gl parameter. This will work exactly the same on your linked domains in Google Analytics 4.

Google Analytics 4 cross site tracking in Cloudflare

Final words

Google Analytics 4 is a next generation of web analytics. It changes the approach and prepares businesses to unified methodology across all Google Tools, like Google Ads, Google Tag Manager and all advertising apps.

If you have any problems with setting it, we can help. Please feel free to contact us.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

Check our posts

future trends in crm automation AIDigideo

Future Trends in CRM Automation – AI

, , , ,
As businesses strive to enhance customer relationships and streamline their operations, Customer Relationship Management (CRM) systems have become indispensable tools. Zoho CRM, a leading platform in this space, is continuously evolving to incorporate cutting-edge technologies. This article explores the future trends in CRM automation within Zoho CRM, focusing on the integration of Artificial Intelligence (AI), Machine Learning (ML), and bots, and how these advancements are set to revolutionize customer relationship management.
Google Analytics 4 multi-site tracking

Google Analytics 4 multi-site tracking setup

, , ,
Google Analytics 4 multi-site tracking under one account is a very common request from our clients. You can track: Subdomains automatically —all visitors to both dogs.example.com and www.example.com, with data for both showing in the same report view (profile) Subdirectories—only visitors to the www.example.com/dogs subdirectory in a separate report as if it were a single site 3rd-party shopping carts—visitors to your online store and to your shopping cart hosted on another domain Top-level domains—all visitors to two domains that you own, such as www.example-petstore.com and www.my-example-blog.com, with data for both showing in the same report view (profile)
Google Analytics 4 cross domain tracking - configure tag

Google Analytics 4 Ecommerce measurement

, , ,
Google Analytics 4 ecommerce tracking Many carts like Shopify, Magento 2 or Woocommerce have great plugins which you can easily enable the ecommerce tracking. For other apps it is a little bit complicated than it used to be in the Universal Analytics. Google suggests to use Google Tag Manager for adding ecommerce measurement. Actually it is true and we modify tags there.
2024 eCommerce statistics - technologies Web Usage Distribution

Ecommerce Statistics in 2024

,
E-commerce is changing all the time. Recently it has slower increase year by year in volumes and profits, but it is still a good type of business or channel for the established business. If you plan to choose the platform or IT provider, such type of statistics can be very useful for the analysis.