如何将 Google Analytics 添加到 Github 存储库 [英] How to add Google Analytics to Github respository
问题描述
我喜欢在我的 github 存储库中添加谷歌分析.所以我可以跟踪用户访问.
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 页面
See this related post for more info: How to add Google Analytics Tracking ID to GitHub Pages
这篇关于如何将 Google Analytics 添加到 Github 存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!