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.

Check our posts

5 Fraud Detection AI apps for eCommerceDigideo

5 Fraud Detection AI Apps for E-commerce

, , ,
Estimated reading time: 13 minutes Check our similar posts Typical ecommerce faqs Woocommerce setup - Wordpress Why entrepreneurship behavior is important for your company Magento vs Shopify vs…
Turn prospects into profit - coustomer journey, Google Ads, Think Lead Gen 2024Digideo

Turn prospects into profit

, , , , , , ,
Estimated reading time: 5 minutes Check our similar posts Most Important Ecommerce Metrics KPI How to prepare yourself for marketing automation? Buying Marketing Automation tool Lead qualification B2B in Zoho…
Creating a Customized Checkout Experience in Magento 2

Creating a Customized Checkout Experience in Magento 2 with Aheadworks One Step Checkout

Estimated reading time: 11 minutes Check our similar posts Typical ecommerce faqs Digideo Blog - Insights & Innovations: Transforming eCommerce & Digital Strategy Why entrepreneurship behavior…
Customer journey mapping in Zoho CRMDigideo

Customer journey mapping in Zoho CRM

, ,
Customer Journey Mapping in Zoho CRM involves visualizing and analyzing customers' steps when interacting with a business across various channels. This comprehensive view helps organizations understand customer behavior, identify pain points, and optimize engagement strategies. What is the Customer Journey? The customer journey represents a customer's complete experience with a business, from initial awareness through consideration, purchase, retention, and advocacy. By understanding this journey, companies can identify critical touchpoints, pain points, and opportunities for improvement.
What are factors that contribute to a good user experience of an online shop, website, or appDigideo

What factors contribute to a good user experience in an online shop

, , , ,
Estimated reading time: 4 minutes User experience strategy Finally mobile usage exceeded desktop usage globally How to deliver an e-commerce project Content is a king Why the personalization in…