Our website has multiple domains and each domain is used for a different language (example.com for english, example.de for german). But for some reason all events appear tracked with the .com domain. What could be the issue?

  • Where are you seeing this .com domain in your events? Are you attaching the URL as part of the label or something?
    – nyuen
    Commented Jun 7, 2016 at 20:45

2 Answers 2


@TC Dani,

Please note I have no personal experience with this issue yet. I have a project coming up that will be multi-lingual...

A quick google search brought me to this discussion:

Here their discussion indicates you will need two different tracking codes and you could implement this as follows, noting the code is in PHP format:

if( ICL_LANGUAGE_CODE == 'en' ) { //english
     $ua_gcode = "123456";
} else if( ICL_LANGUAGE_CODE == 'fr' ) { //french
     $ua_gcode = "123654";
} else { //others
     $ua_gcode = "654321";

getTracker(<?php echo 'UA-'.$ua_gcode; ?>);

Hopefully this will help you along your path to resolve.


I think that, if you just want to be able to see the events separately for each language version, the best approach would be to create one view in Google Analytics for each language.

You can do this by adding a filter to each view, so it would register only the traffic for the proper ccTLD of your project. You will have to filter by hostname.

Then, each event would be registered on the correct view :). This way, you can solve your problem without needing to add new code to your project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.