How to Add a Subdomain in Google Analytics 4 : Detailed Guide
Google Analytics 4 (GA4) is the latest version of Google Analytics, offering advanced tracking capabilities and powerful insights. If you have multiple subdomains and want to track them individually in GA4, it's crucial to add each subdomain to your account.
In this step-by-step guide, we'll walk you through the process of adding a subdomain to your GA4 property.
Step 1: Sign in to your Google Analytics account.
-
Open your web browser and go to the Google Analytics website (analytics.google.com).
-
Sign in using your Google account credentials.
Step 2: Access the Admin settings.
-
Once logged in, click on the "Admin" tab located at the bottom left corner of the page.
-
In the "Property" column, select the relevant GA4 property you want to add the subdomain to.
-
Click on "Data Streams" under the "Property" column.
Step 3: Create a New Data Stream for the Subdomain
-
On the "Data Streams" page, click on the "+ New Data Stream" button.
-
Choose "Web" as the data stream source.
Step 4: Configure the Subdomain Data Stream
-
Enter a name for the data stream, representing your subdomain (e.g., "Subdomain Tracking").
-
Select the appropriate time zone for the subdomain's location.
-
Enter the website URL of the subdomain in the provided field.
-
Enable the advanced settings if required, and customise them according to your needs.
-
Click on the "Create Stream" button to proceed.
Step 5: Implement the Measurement ID on the subdomain.
-
After creating the data stream, you will receive a Measurement ID for the subdomain.
-
Copy the Measurement ID provided on the confirmation page or from the "Data Streams" list.
Step 6: Add the Measurement ID to the Subdomain's Tracking code.
-
Access the website's files or content management system (CMS) for the subdomain.
-
Locate the header section of the subdomain's HTML or template files.
-
Insert the GA4 tracking code snippet just before the closing "</head>" tag.
-
Replace the existing Measurement ID (if any) with the new Measurement ID specific to the subdomain.
-
Save the changes and ensure the tracking code is implemented on all pages of the subdomain.
Step 7: Verify the Tracking Implementation
-
Go back to the GA4 interface.
-
In the "Data Streams" list, find the subdomain data stream and click on the three-dot menu.
-
Select "Tag Assistant" to verify if the tracking code is correctly implemented.
-
The Tag Assistant will analyse the subdomain and provide feedback on the implementation status.
Step 8: View Subdomain Data in GA4
-
After successful tracking implementation, you can start viewing data for the subdomain.
-
Navigate to the "Reports" section in GA4.
-
In the top-left corner, select the relevant property and data stream for the subdomain.
-
Explore the various reports and metrics to analyse the performance of your subdomain.
By following this detailed guide, you can easily add a subdomain to your GA4 property and gain valuable insights into its performance using the advanced tracking capabilities of Google Analytics 4. Tracking individual subdomains allows you to understand user behaviour, optimise each subdomain's performance, and make data-driven decisions to enhance your online presence. Leverage the power of GA4 and unlock valuable insights for each of your subdomains.
If you need more help on setting up or migrating the Universal Analytics Data to GA4 feel free to reach out to us, Contact us.
Image by storyset on Freepik