google-analytics-api

“Not sufficient permissions” google analytics API service account

拜拜、爱过 提交于 2019-12-03 04:46:08
问题 I'm trying to fetch data with the Google Analytics API through service accounts. I have been searching on stackoverflow how to do this and been using the exact same code found on several posts but getting problems to get it working. Sources: Service Applications and Google Analytics API V3: Server-to-server OAuth2 authentication? Service Applications and Google Analytics API V3: Error 101 (net::ERR_CONNECTION_RESET) http://code.google.com/p/google-api-php-client/source/browse/trunk/examples

Google Tag Manager with AngularJS?

不羁岁月 提交于 2019-12-03 04:22:51
问题 How do I use GTM with Angular? I'm trying to fire a (virtual) pageview event when I load a new partial using this code: dataLayer.push({ 'event' : 'pageview', 'pageview' : $location.path(), 'virtualUrl' : $location.path() }); But I don't see the event firing (I'm using the Google Analytics Chrome debug extension to view fired events). 回答1: I find the Chrome extension unreliable. Simply run the global variable dataLayer in the console to print the array of events. One of the objects should be

Google Analytics API v4 for Android Does NOT Send Screen Views

末鹿安然 提交于 2019-12-03 02:28:29
I've set all things for google analytics api v4 as it mentioned here: https://developers.google.com/analytics/devguides/collection/android/v4/ and here: http://www.javacodegeeks.com/2014/04/working-with-google-analytics-api-v4-for-android.html I can see real time data but i could NOT see Screens, Active Users,New Users and Top Device Models in specific time period such as "All Time". Analytic does not send screen views. Here is my global_tracker.xml <string name="ga_trackingId">UA-XXXXXXXX-Y</string> <integer name="ga_sessionTimeout">300</integer> <bool name="ga_autoActivityTracking">true<

PHP Google Analytics API - Simple example

久未见 提交于 2019-12-03 00:16:18
I am trying to set some basic example of using Google Analytics with this library: https://github.com/google/google-api-php-client For starter I have: <?php require_once 'Google/Client.php'; require_once 'Google/Service/Analytics.php'; $client = new Google_Client(); $client->setApplicationName("Client_Library_Examples"); $client->setDeveloperKey("MY_SECRET_API"); //security measures $service = new Google_Service_Analytics($client); $results = $service->data_ga; echo '<pre>'; print_r($results); echo '</pre>'; Q: How to get data from Google Analytics from this query ? /* https://www.googleapis

Google Analytics - Access api without login

点点圈 提交于 2019-12-02 22:39:18
I had successfully configured google analytics api and get successful data. I want to access analytics api without gmail login. i.e. I will hard code credentials to for login, but how to do it with PHP? Is there any api function to achive this task (for PHP) Thanks! The Hello Analytics API: PHP Quickstart Guide for Service Accounts will walk you through the steps necessary to create and add a service account to your existing Google Analytics Account/Property/View. Once you download have the php client libs and the p12 file downloaded from developer console you can create an authorized

How to login to Google API with Service Account in C# - Invalid Credentials

谁说我不能喝 提交于 2019-12-02 21:17:06
I'm beating myself bloody trying to get a simple service acccount login to work in C#, to Google API and Google Analytics. My company is already getting data into Analytics, and I can query information with their Query Explorer, but getting started in .Net is not going anywhere. I am using a Google-generated json file with PKI, as the documentation says that such a service account is the proper way for computer-to-computer communication with Googla API. Code snipet: public static GoogleCredential _cred; public static string _exePath; static void Main(string[] args) { _exePath = Path

Query Google Analytics by User ID

北慕城南 提交于 2019-12-02 20:33:27
Is there a way to query results using the Core Reporting API (v3) and filtering those results by the User ID assuming that it is being sent to Google Analytics properly? I've googled this question a lot and read a whole bunch of articles but I did not find one place that does that. Moreover, the fact that I cannot see the User ID anywhere in the reporting interface makes me doubt that this is even possible. I'm guessing I will have to dome something similar to what is recommended here in order to do it? UPDATE Apparently, the purpose of my question is not very clear as highlighted by Eike's

“Not sufficient permissions” google analytics API service account

不想你离开。 提交于 2019-12-02 17:58:29
I'm trying to fetch data with the Google Analytics API through service accounts. I have been searching on stackoverflow how to do this and been using the exact same code found on several posts but getting problems to get it working. Sources: Service Applications and Google Analytics API V3: Server-to-server OAuth2 authentication? Service Applications and Google Analytics API V3: Error 101 (net::ERR_CONNECTION_RESET) http://code.google.com/p/google-api-php-client/source/browse/trunk/examples/prediction/serviceAccount.php This is what i got: require_once('googleAPIGoogle_Client.php'); require

Google Tag Manager with AngularJS?

懵懂的女人 提交于 2019-12-02 17:38:14
How do I use GTM with Angular? I'm trying to fire a (virtual) pageview event when I load a new partial using this code: dataLayer.push({ 'event' : 'pageview', 'pageview' : $location.path(), 'virtualUrl' : $location.path() }); But I don't see the event firing (I'm using the Google Analytics Chrome debug extension to view fired events). Mike Causer I find the Chrome extension unreliable. Simply run the global variable dataLayer in the console to print the array of events. One of the objects should be your pageview event. Here is an example of how we are using it: Note: we're not simply using

Import 3rd Party Page Views Data on Google Analytics

♀尐吖头ヾ 提交于 2019-12-02 17:04:38
问题 Is there a way to import 3rd party page view data to Google Analytics? For example, if I have file download information from my server logs, could I put the information on Google Analytics and have it show up in the standard reports or a custom report alongside the existing pageview data already provided by Analytics? 回答1: Yes, but you need to do it within 4 hours of the hit being logged. Take a look at the GA measurement protocol. The hour limit is due to the qt param (milliseconds from hit