Mobile app version of vmapp.org
Login or Join
Smith883

: Google Analytics event tracking for different language domains Our website has multiple domains and each domain is used for a different language (example.com for english, example.de for german).

@Smith883

Posted in: #Analytics #EventTracking #GoogleAnalytics #Language #MultipleDomains

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Smith883

2 Comments

Sorted by latest first Latest Oldest Best

 

@Dunderdale272

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.

10% popularity Vote Up Vote Down


 

@Goswami781

@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:

<script>
<?php
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; ?>);
</script>


Hopefully this will help you along your path to resolve.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme