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. If it continues to show stats for a different domain compared to the one you entered, it simply means that the domain does not match.

googleanalytics

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.

googleanalytics

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.


Keep in mind that if you register a Google Analytics property as http://www.mywebsite.com and you change it at a later time for example to https://mywebsite.com, despite the fact that Google Analytics shows the new domain https://mywebsite.com in the Google Admin console, it internally never changes the original domain that continues to be the original one 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 https://mywebsite.com. You must delete and re-create a new property in Google Analytics using the new domain https://mywebsite.com from the beginning to actually have it changed.

Useful Links:
http://storejextensions.org/forum/view/10-jsitemap/2931-two-different-urls-in-google-webmaster-tools-and-google-analytics.html
http://storejextensions.org/forum/view/10-jsitemap/1941-re-wrong-google-account
http://storejextensions.org/forum/view/10-jsitemap/2909-re-solved-google-webmaster-tools