Davis Zhao :
Davis Zhao :
Thank you DaImTo The following code can get the analysis results I want, I hope it can help others
I useGoogle Analytics API Symfony Bundle
//Get daily views for the past week
$pageView = $analyticsService->getDataDateRangeMetricsDimensions($viewId, '7daysAgo', 'today', ['pageviews'], ['date']);
//Get page views every hour of the day
$pageView = $analyticsService->getDataDateRangeMetricsDimensions($viewId, 'today', 'today', ['pageviews'], ['hour']);
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=220153&siteId=1