1

In my settings for Google Analytics I need to add a javascript snippet in the "after" section, to track a second account (the main account works fine).

I added this:

ga("create", "UA-xxxxxxxx-x", {"cookieDomain":"auto"}); ga("set", "anonymizeIp", true); ga("send", "pageview");

It does not work at all though. How shall I change this to make it work? The Google Analytics module version is 7.x-2.3.

Note: I don't think this question is a duplicate of "Google Analytics configuration setting for Drupal multisite (domain and submain)": the other question is about two different domains, I have only one domain, which is tracked by 2 accounts. Also under the text box where I am supposed to paste my javascript snippet in the GA module UI, you can find this text: '

This is useful if you'd like to track a site in two accounts

... which suggests that you really can track 2 accounts for 1 site. My problem is that the snippet I entered does not work. The second account does not recieve any data.

  • Hello. No, I don't think this is a duplicate. The other question is about two different domains. I have only one domain, which is tracked by 2 accounts. Also under the text box where I am supposed to paste my javascript snippet in the GA module UI, you can find this text: 'This is useful if you'd like to track a site in two accounts.'. – TBJ Sep 8 '16 at 6:16
  • What's the difference between this question and this question? BTW: both questions have an identical answer ... – Pierre.Vriens Sep 8 '16 at 12:32

Browse other questions tagged or ask your own question.