简体   繁体   English

google Analytics API php,如何访问以特定网址开头的所有着陆页的总会话

[英]google analytics api php, how to access total sessions for all landing pages that start with a certain url

i want to access the total number of sessions for landing pages that start with the url "/biz". 我想访问以网址“ / biz”开头的目标网页的会话总数。

Here are the dimensions and metrics I am using: 以下是我使用的尺寸和指标:

    $dimensions = "ga:landingpagePath";
    $metrics = "ga:sessions";
    $filters = "ga:landingpagePath=~^/biz"; 
    $sort = "-ga:sessions";

But this prints out the individual pages and sessions for each. 但这会打印出各个页面和会话。 I want all of these sessions added up. 我希望所有这些会议加起来。 And I cant write a program to do it myself because there are just too many of them and they exceed the limit. 我不能自己编写程序,因为它们太多了,而且超出了限制。

Don't use the dimension ga:landingPagePath if you want to get the aggregated value. 如果要获取汇总值,请不要使用维度ga:landingPagePath。 If you have to set dimensions to a non-blank value use something with just one row expecting like ga:hostname. 如果必须将尺寸设置为非空白值,请使用仅一行的内容,例如ga:hostname。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM