J!Extensions Store™
Faq Why the Google Analytics integration shows stats for a different domain?

Why the Google Analytics integration shows stats for a different domain?

Created on:Sunday, 08 March 2015 10:44

When you connect to your Google Analytics account through the JSitemap Professional integration, if your Google account has more than one property website, by default Google will return stats for the last added property domain.

In this case you can specify a particular domain available in your Google Analytics account for which you want to retrieve stats, to do this simply use the configuration parameter 'Site domain' as shown in the picture below and set the needed domain address.


Moreover you can directly monitor all the real domains assigned to your Google Analytics account and pick up the correct one. To do this, you have to leave empty the 'Site domain' parameter and enable the parameter 'Advanced settings' -> 'Enable PHP debug' in JSitemap configuration. After that, when you open the Google Analytics integration you will see the list of real domains available for your Google Analytics account used to login.


Take care that the domain specified must match exactly the one registered in your Google account, thus it must use the same protocol, the same prefix if any, etc. If you have registered your website to Google as http://mydomain.com and you specify in JSitemap the preferred domain as http://www.mydomain.com or https://mydomain.com it won't work and Google will continue to fallback to the last added property domain.

As a final recommendation when you register a Google Analytics property as http://www.mywebsite.com and you change it at a later time for example to http://mywebsite.com despite the fact that Google Analytics shows the new domain http://mywebsite.com in the admin console, it internally never changes the original domain that continue to be http://www.mywebsite.com. The original internal link will continue to be used even for the API integration with JSitemap that needs to be configured for http://www.mywebsite.com and not http://mywebsite.com. You have to delete and create again a new property in Google Analytics using http://mywebsite.com to have it really changed.

Useful Links: