user1576440
user1576440

Reputation: 51

List of URLs and visits from Google Analytics API

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.

Upvotes: 4

Views: 651

Answers (1)

NoUseFreak
NoUseFreak

Reputation: 11

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.

Upvotes: 1

Related Questions