Support » Plugin: Google Analytics for WordPress by MonsterInsights » Multilanguage on different Domain, Analytics?

  • Hello,

    I’m running a multilanguage site with the popular WPML plugin.

    With this plugin I can map each website language to a different domain (alias)

    Is there a way to “translate” the UA code so that i can have a different Analytics account for each website?

    I already tried WPML string translation, but it looks like the UA code is not among the translatable strings.

    Any suggestion?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author chriscct7


    Hi there,
    If you use subdomain per language, which is probably the most common, widely used and recommended method for setting up WPML, then you don’t need to worry about this as you would then configure your GA account to monitor all of your subdomains or top-level domains. You would not need different GA code per language but the same tracking code will monitor all languages with this setup.

    Alternatively you can use something like this:

    hello Chris,
    actually I’m on different domains (not subdomains).

    I tried the snippet you linked, but I still have the same tracking ID on every language.
    The tracking ID I see is the one i set in plugin options, if i remove that, no tracking is applied.

    infact if I var_dump($yoast_ga) the result is NULL

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multilanguage on different Domain, Analytics?’ is closed to new replies.