[英]How to get Google analytics data in chart
我想使用PHP
在任何图表中获取Google Analytics
数据
我已经在我的帐户中创建了一个项目,
跟踪代码
谷歌身份验证的所有凭据。
我已点击此链接,我的跟踪代码在这里
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-xxxxxxxx-1', 'auto');
ga('send', 'pageview');
</script>
但我不知道该怎么做
尝试为此先下载身份验证中的.12,然后添加sdndsuidds-fkmfsdfdsf-545.p12文件,然后在文件中检查此代码
$google_account = array(
'email' => 'your-project-email@developer.gserviceaccount.com',
'key' => file_get_contents('file-name.p12'),
'profile' => 'profil-id'
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.