如何将Google Analytics(分析)添加到Github存储库 [英] How to add Google Analytics to Github respository
问题描述
我想在我的github仓库中添加Google Analytics(分析).这样我就可以跟踪用户访问.
I like to add google analytics on my github respository. So i can keep track of user visit.
推荐答案
不幸的是,您不能使用Google Analytics(分析)来监视GitHub存储库页面,因为您根本不拥有该页面.GitHub提供了自己的流量分析平台.
Unfortunately, you cannot use Google Analytics to monitor your GitHub repository page because you simply do not own the page. GitHub offers their own traffic analytics platform.
我自己尚未对此进行验证,但是如果您在<您的GitHub用户名> .github.io
(或使用GitHub Pages的特定项目页面)上拥有GitHub Pages站点,则可以将Google Analytics(分析)添加到该网站.它不一定捕获对特定存储库页面的访问,但是它可以有所帮助,尤其是当您拥有一个特别活跃的GitHub Pages网站时.
I have not verified this myself, but you if you have a GitHub Pages site at <your GitHub username>.github.io
(or a specific project page using GitHub Pages), you could add Google Analytics to that site. It won't necessarily capture visits to the specific repository page, but it could help, especially if you have a particularly active GitHub Pages website.
有关更多信息,请参见此相关文章:如何将Google Analytics(分析)跟踪ID添加到GitHub Pages
See this related post for more info: How to add Google Analytics Tracking ID to GitHub Pages
这篇关于如何将Google Analytics(分析)添加到Github存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!