Google can't find Analytics snippet on Github

2019-04-20 16:26发布

问题:

For some time now, I have had troubles getting Google Analytics to work properly on my generated Github Pages. I've used the default snippet provided by Google but I think that the crawler that is looking for the snippet looks in the url victorbjelkholm.github.com instead of victorbjelkholm.github.com/2012-I-Bilder/. However, my default url in the Google Analytics profile is http://victorbjelkholm.github.com/2012-I-Bilder/ so it should be no problem.

Do anyone had a similar experience of adding Google Analytics to sites on Github Pages?

Do anyone have a suggestion on what could solve this so I can get some stats from my site?

The url is http://victorbjelkholm.github.com/2012-I-Bilder/

回答1:

I went into the Profile Settings of the active profile and changed Default page to index.html. Now my tracking code can be found correctly.



回答2:

Do you have any filters on the UA-20806824-11 Google Analytics profile that could be filtering out data from Github?

I took a look at your site: the GA code looks good, and I saw tracking data for the page view being sent to the analytics servers.