Google Analitics tracking code

  • Jasway
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
11 years 5 months ago #34089 by Jasway
Hey

How is it possible to be able to track with a sigle google analitics code only a sigle language of my site, e.g. the english one for all its pages and subpages??

Please Log in to join the conversation.

More
11 years 5 months ago #34104 by ivan.milic
I can only tell you way you can place different code spinets based on language. I'am not sure how google itself handles that , maybe you can open different accounts but I'am totally not sure.

In index.php of template, someware below BODY tag:
<?php
$lang = JFactory::getLanguage();
if($lang->getTag() == "en-GB"){ ?>
<!-- HERE GOES CODE SNIPPET FOR ENGLISH -->

<?php } else if($lang->getTag() == "fr-FR"){ ?>
<!-- HERE GOES CODE SNIPPET FOR FRANCH -->

<?php } else if($lang->getTag() == "de-DE"){ ?>
<!-- HERE GOES CODE SNIPPET FOR GERMAN -->

<?php } ?>

Please Log in to join the conversation.

Time to create page: 0.170 seconds
Powered by Kunena Forum