用于 Google Analytics API 的 PHP 类
我想找到一个 PHP 类或框架来从 Google Analytics API 获取数据。
我已经使用过 gapi,它很棒,但它自 2009 年以来从未更新过,并且缺乏 API 的新功能(例如分段)。
您能分享一下您使用过的类及其主要功能吗?
谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:我确实找到了一个实验存储库的 ="nofollow">问题 28。
您提到了gapi 已经存在,但就 Google Analytics 的 PHP 库而言,它似乎是标准。您可能会在 GitHub 包含您所需的功能。
我环顾四周,似乎您最好的选择是分叉现有的类(例如gapi)并向其添加功能,这不是您想听到的。我建议您查看一下 Google 支持的库以获取线索关于他们如何实现您想要的功能。
这是您为开源项目做出贡献的好机会。尽管此代码最后一次更改是在 2009 年,但它相当短,并且只要有相应的 API 功能,就可以轻松自定义以执行您想要的操作。
尝试使用查询浏览器来查看可用的内容。看起来它也可以帮助您构建分段查询。
Edit: I did find an experimental implementation of segments in issue 28 for the repository.
You mentioned gapi already but it seems to be the standard as far as a PHP library for Google Analytics goes. You may find fresher classes on GitHub with your needed functionality.
I took a look around and it seems that your best option is to fork an existing class such as gapi and add the functionality to it which is not what you wanted to hear. I recommend taking a look around at the Google supported libraries for clues on how they implemented the features you want.
This is a good opportunity for you to contribute to an open-source project. Even though this code was last changed in 2009, it's fairly short and can be easily customized to do what you want as long as the corresponding API functionality is there.
Try using the Query Explorer to see what's available. It looks like it will help you build segment queries too.