Questions tagged [google-analytics-api]

A set of APIs for building custom reporting solutions and programmatically managing existing Google Analytics accounts and users.

Google Analytics is a free data collection and analysis platform by Google. The Reporting and Management APIs are for developers already tracking data with the Google Analytics collection libraries. See also the google-analytics tag for general information.

The Reporting APIs

Save time by automating complex reporting tasks and integrate Google Analytics data with other data for deeper insights about your business with these Reporting APIs:

The Management API

Authorized users can programmatically access and manage Google Analytics accounts, users, and data with the Management API.

In addition to managing all account levels and users, you can also use this API to manage certain types of data, like upload cost data to Google Analytics for non-Google paid campaigns, retrieve account data to use with the Reporting APIs, and manage content experiments.

Demos & Tools

Developers to discover what's possible with the Google Analytics Platform. Explore what’s possible and learn how to build powerful and flexible applications with the Google Analytics Demos & Tools.

More links:

4319 questions
19
votes
4 answers

Using Google Analytics from a .NET desktop application

Is it possible to send "PageViews" and record activity using the official Google API for C#? for instance, if i want to track page views for my wpf/winforms desktop app. ? Where can i find some oficial examples?
Uri Abramson
  • 6,005
  • 6
  • 40
  • 62
18
votes
2 answers

Google Analytics measurement protocol authentication?

I'm looking at Googles Measurement Protocol, which gives you a way to send google analytics information from your server. However, there doesn't seem to be any authentication required. Have I missed something? Otherwise, what's to stop other people…
steve cook
  • 3,116
  • 3
  • 30
  • 51
17
votes
2 answers

How to programmatically get campaign/source/medium for current Visit in Google Analytics

I'd like to know how active are the users depending on the source/medium/campaign of the traffic they came from before sign up. I'm hitting wall when trying to get campaign/source/medium for the current visit from Google Analytics tracker in JS. I…
Marcin
  • 591
  • 5
  • 12
17
votes
2 answers

Google Analytics - Visit duration 0 sec

I am using Google Web Analytics Online Tool to monitor visits on my site. What bugs me is that often I see that records contain the folloowing entries: Page Visits: 1.00 Average Visit Duration: 00:00:00 Bounce Rate: 100% What does that mean? If the…
Dantes
  • 2,791
  • 6
  • 26
  • 34
16
votes
2 answers

Google Analytics gtag.js ready callback

I try to update my Google Analytics implementation from analytics.js to the new gtag.js. In the old implementation I am using the ready callback function. ga(function() { console.log('Google analytics is ready'); }); How can I implement a…
xela84
  • 262
  • 2
  • 10
16
votes
4 answers

Google API Oauth2: Only one refresh token for all users?

I am using OAuth2 Authentication, and I have a CMS with multiple users, each with their own profiles. It happens that our company has a Google account with access to multiple Analytics accounts. For each user who uses the CMS, I connect to the…
16
votes
5 answers

Google API access using Service Account oauth2client.client.CryptoUnavailableError: No crypto library available

I am trying to create a service account app so that I can access Google Analytics api using Python. Two things are confusing me. First, when I use the following code: `from oauth2client.client import SignedJwtAssertionCredentials client_email =…
FierceScarf
  • 461
  • 1
  • 5
  • 17
16
votes
2 answers

Integrating Google Analytics into GWT application

This should be totally simple but I can't get it working no matter what I try. I'm trying to use Google Analytics with GWT application. From what I understood, there are two way to do it: First is synchronous, by inserting tracking code at the end…
Domchi
  • 10,705
  • 6
  • 54
  • 64
16
votes
5 answers

Profiling the Performance of a Google App Script

I've written a Google App Script to pull in Google Analytics data into a Google Spreadsheet. It's a fairly long running script making multiple requests to the GA Reporting API, it also uses Google App's ScriptDB. Is there a good way of profiling…
16
votes
1 answer

How to pull Google Analytics stats?

Is Google API Ruby client the best option? I have a site example.com with users and I want them to see their google analytics stats on example.com, how can I do it ? I can see the example but I'm not able to figure out how to begin.
16
votes
1 answer

Google Analytics V2 not recording stats from Android app

I'm using EasyTracker from the SDK for Android V2.0 beta 3. I've followed all the steps described at https://developers.google.com/analytics/devguides/collection/android/v2/, and have ensured that there are hyphen characters and not en dashes in my…
Daniel
  • 163
  • 2
  • 6
16
votes
5 answers

How do I use a Service Account to Access the Google Analytics API V3 with .NET C#?

I realized this question has been previously asked but with little in the way of example code, so I am asking again but with at least a little bit of direction. After hours of searching, I have come up with the following partial…
Richard Collette
  • 5,462
  • 4
  • 53
  • 79
15
votes
5 answers

Issue in finding Tracking Id for Google Analytics

I have to integrate Google Analytics in my Android app. Completed all the code for it But, Having one issue. The Issue is taking Tracking ID from my google analytics account. According to the Document : ==> To find the Google Analytics ID (Tracking…
Jaimin Modi
  • 1,530
  • 4
  • 20
  • 72
15
votes
2 answers

Analytics API & PHP - Get reports in different format

The following code returns an object of Google_Service_AnalyticsReporting_GetReportsResponse $body = new Google_Service_AnalyticsReporting_GetReportsRequest(); $body->setReportRequests($aRequests); return…
Nick
  • 3,231
  • 2
  • 28
  • 50
15
votes
9 answers

Google Analytics Access with C#

I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#?