Google AnalyticsAPI的网址和访问列表

时间:2022-02-08 14:29:58

I want to show number of visits of each article on my page. I am trying to download a list of urls and visits from Google Analytics using PHP class. I was searching for some sample code but no luck. I need result with all single urls and visits of these urls. I found only samples where people were getting total visits or visit of single url. I need a list of urls and visits.

我想在我的页面上显示每篇文章的访问次数。我正在尝试使用PHP类从Google Analytics下载网址和访问列表。我正在寻找一些示例代码,但没有运气。我需要所有单个网址和访问这些网址的结果。我发现只有人们可以访问或访问单个网址的样本。我需要一个网址和访问列表。

1 个解决方案

#1


1  

Are you using the google-api-php-client. It has a class "\Google_AnalyticsService" to perform analytics api calls. You can get your pagePaths by setting the "dimensions" of your query.

你在使用google-api-php-client吗?它有一个“\ Google_AnalyticsService”类来执行分析api调用。您可以通过设置查询的“维度”来获取pagePath。

#1


1  

Are you using the google-api-php-client. It has a class "\Google_AnalyticsService" to perform analytics api calls. You can get your pagePaths by setting the "dimensions" of your query.

你在使用google-api-php-client吗?它有一个“\ Google_AnalyticsService”类来执行分析api调用。您可以通过设置查询的“维度”来获取pagePath。