Search code examples
google-analyticsanalyticsgoogle-analytics-4

Tracking different language web domains on Google Analytics (GA4)


I've a website and I've different domains for each language site.

For example, I have, https://www.example.com

I also have https://in.example.com and also https://br.example.com

Currently, my GA4 property(set up by another colleague) seems to be capturing data for all of them together.

On Google Data studio, I can see this when I try to use the "Full page URL" column and see views corresponding to in, uk and

I'm unsure how this works and was wondering what the best way of tracking different domains would be.

Editing to make it clearer. The problem I faced was that I was using the pre-created dashboards on Google Analytics. The answer here helps me with what I need, i.e. using the hostname and the page path dimensions to get data for different hostnames separately


Solution

  • Well yes, you already have the hit-level hostname dimension that allows you to distinguish between the subdomains. Full UTL should do the trick too.

    Using a custom dimension for this is unwise since their number is limited.

    You indicate that there's a problem, but don't actually describe it. If you want to be sure that all data is captured correctly, you need to go to the site and inspect the network requests its pages send to Google's collect endpoint. You want to look at the dl field there and make sure that it reflects the full url properly. I actually wouldn't suggest doing it unless there are indicators in data that something's wrong since dl is always equal to window.location.href by default and is rarely overriden.