Support » Plugin: Google Analytics Dashboard Plugin for WordPress by MonsterInsights » Custom code, subdomains and _setDomainName

  • I was scratching my head trying to figure out why, despite having set the ‘Subdomain Tracking’ value to ‘’, I was still getting cookies sent to my static domain ‘’.

    After much fiddling around, I found that the plugin adds the _setDomainName call right before the call to trackPageView. However, the _setDomainName has to be the first thing that is called after the setting of the tracking ID. If you have any custom code (which I have) then the result is that you get cookies set both on AND

    As a workaround, I simply set the ‘_setDomainName’ call manually as the first statement in my custom code. Ugly, yes, but it works now.

    This really should be fixed.

  • The topic ‘Custom code, subdomains and _setDomainName’ is closed to new replies.