google-analytics-api

How to run Google Embed API Server-side Authorization with PHP?

社会主义新天地 提交于 2020-05-11 17:33:11
问题 I am trying to run the Google Embed API Server-side Authorization demo, here: https://ga-dev-tools.appspot.com/embed-api/server-side-authorization/, but using PHP instead of Python for Step 3 (Using the JSON key data to request an access token). I have installed the Google API PHP client: https://github.com/google/google-api-php-client. I have created a Service Account (https://console.developers.google.com), enabled Analytics API for it, downloaded the JSON key file, and copied that to my

How to run Google Embed API Server-side Authorization with PHP?

淺唱寂寞╮ 提交于 2020-05-11 17:33:06
问题 I am trying to run the Google Embed API Server-side Authorization demo, here: https://ga-dev-tools.appspot.com/embed-api/server-side-authorization/, but using PHP instead of Python for Step 3 (Using the JSON key data to request an access token). I have installed the Google API PHP client: https://github.com/google/google-api-php-client. I have created a Service Account (https://console.developers.google.com), enabled Analytics API for it, downloaded the JSON key file, and copied that to my

Google PHP API too many files

感情迁移 提交于 2020-05-09 02:34:22
问题 I am trying to create a plugin for WordPress using the Google Analytics Reporting API v4 https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php We need to load the Google API PHP Client Library require_once __DIR__ . '/vendor/autoload.php'; I have downloaded the latest release of Google API https://github.com/google/google-api-php-client/releases but the vendor folder contains more than 7000 files! My question is if I am doing something wrong here or I am

Google Analytics API 500 internal error during AdWords link creation

天大地大妈咪最大 提交于 2020-02-24 14:58:48
问题 I'm getting Error : "code":500,"message":"There was an internal error." exception every time I'm trying to link Google analytics to Adwords via Analytics Management API. Code is pretty straightforward (PHP), just like documentation example: $adwordsAccounts = []; foreach ($adwordsAccountIds as $customerId) { $adwordsAccount = new \Google_Service_Analytics_AdWordsAccount(); $adwordsAccount->setCustomerId($customerId); $adwordsAccount->setAutoTaggingEnabled(true); $adwordsAccounts[] =

Google Analytics API 500 internal error during AdWords link creation

余生长醉 提交于 2020-02-24 14:58:06
问题 I'm getting Error : "code":500,"message":"There was an internal error." exception every time I'm trying to link Google analytics to Adwords via Analytics Management API. Code is pretty straightforward (PHP), just like documentation example: $adwordsAccounts = []; foreach ($adwordsAccountIds as $customerId) { $adwordsAccount = new \Google_Service_Analytics_AdWordsAccount(); $adwordsAccount->setCustomerId($customerId); $adwordsAccount->setAutoTaggingEnabled(true); $adwordsAccounts[] =

Google Analytics UserID API extraction

一世执手 提交于 2020-02-02 19:33:49
问题 Trying to extract a userID from GoogleAnalytics. This is to view which user is the using the website most and least . I would to retrieve the top 5 user IDs and bottom 5 user IDs that were passed using either: gtag('config', 'GA_TRACKING_ID', { 'user_id': 'USER_ID' }); OR using a custom dimension... ( https://support.google.com/analytics/answer/2709828?hl=en ) I'm (vaguely) aware of policies and TOS to keep 'non identifying' information on Google BUT there are posts online indicating you can

Google Analytics API 3 - Error:“invalid_grant”, Description:“”, Uri:“”

五迷三道 提交于 2020-02-02 06:46:35
问题 I've 'googled' the life out of this issue today with zero resolve! I am trying to build a very simple Google Analytics data request console app using a Service account. I have set up all the required details in the Google Developers Console but I am getting the following error: An unhandled exception of type 'Google.Apis.Auth.OAuth2.Responses.TokenResponseException' occurred in Google.Apis.dll Additional information: Error:"invalid_grant", Description:"", Uri:"" Below is the code in my

Unable to retrieve more than 10k records from Google Analytics

独自空忆成欢 提交于 2020-01-30 02:45:12
问题 I've developed a windows console application which extracts Google Analytics data and writes to .CSV file. When queried for data of particular date on Google Analytics Query Explorer, it displayed:- "Your query matched 96782 results...". The problem is when when i query for the data of same date using application, by default it returns only 1000 records and when I set DataResource.GaResource.GetRequest objRequest.MaxResult more than 10k, then it gives me max to max 10k records. Is there any

Unable to retrieve more than 10k records from Google Analytics

[亡魂溺海] 提交于 2020-01-30 02:44:48
问题 I've developed a windows console application which extracts Google Analytics data and writes to .CSV file. When queried for data of particular date on Google Analytics Query Explorer, it displayed:- "Your query matched 96782 results...". The problem is when when i query for the data of same date using application, by default it returns only 1000 records and when I set DataResource.GaResource.GetRequest objRequest.MaxResult more than 10k, then it gives me max to max 10k records. Is there any

Google Analytics Access with C#

帅比萌擦擦* 提交于 2020-01-29 04:28:26
问题 I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#? 回答1: Update : Google launched a Google Analytics API today. Google Analytics Blog - API Launched 回答2: I wrote a small project that lets you generate pretty much any Analytics report. It's listed on Google's Analytics API page - http://code.google.com/apis/analytics/docs/gdata/gdataArticlesCode.html You can read about it here and get the source code - http://www.reimers.dk