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:

3781 questions
11
votes
3 answers

Google Analytics API access without local browser in python

I want to query the Google Analytics API using Python to periodically download data from my Analytics account and store data in a local database. I am basically following the steps as given in the basic tutorial. I am using the Google client API…
j0nes
  • 7,800
  • 3
  • 34
  • 40
11
votes
3 answers

Google Analytics V2 SDK for Android EasyTracker giving errors

I have followed the tutorial for the new Google Analytics V2 SDK for Android located here: https://developers.google.com/analytics/devguides/collection/android/v2/ Unfortunately whenever I go to run the application the reporting is not working and…
Jeff Thomas
  • 4,540
  • 11
  • 36
  • 56
10
votes
3 answers

Google Analytics 4 with React

I've been trying to use react-ga package with google analytics 4 in my app. The measurement id doesn't work with it and there is no tracking code in google analytics 4 I can use. Please, I need help! import ReactGA from 'react-ga'; const trackingId…
10
votes
1 answer

How to retrieve exact user-agent string from Google Analytics

We have an interesting 'bug' in our JS code that only fires when a user agent has a specific combination of parameters -- specifically when IE8 sends both Trident/4.0 and MSIE 6.0; We have checked the GA export data; it appears to export only the…
Will England
  • 103
  • 1
  • 1
  • 7
10
votes
1 answer

How to get a list of views (profiles) in google analytics api v4

I'm trying to upgrade my script from using version 3 of the google analytics API to version 4. In version 3, I could get listings of accounts, properties, and views from the api (see API reference for version 3). However, the API reference for…
matteorr
  • 123
  • 1
  • 5
10
votes
1 answer

Google Analytics API on Codeigniter website

I've been trying to get Google API to work on my website for days now, but not getting it to work. Everywhere I search I find outdated examples... I need it to work with codeigniter and all I want to do is to fetch data from Google Analytics to show…
Michael
  • 783
  • 1
  • 5
  • 23
10
votes
4 answers

Google Analytics - Access api without login

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…
10
votes
2 answers

Google Analytics: custom metrics/dimensions vs events

What is the difference between custom metrics/dimensions and events? As far as I know, the basic differences are: Metrics aren't sent right away when they're set, but on the subsequent hits; Dimentsions aren't tied to metrics as events actions are…
Marcio Cruz
  • 1,823
  • 1
  • 21
  • 30
9
votes
4 answers

What's the difference between Google Analytics API client libraries? (google-api-dotnet-client vs. google-gdata)

What is the difference between the Google APIs Client Library for .NET (google-api-dotnet-client) and .NET library for the Google Data API (google-gdata) as they pertain to the Google Analytics API?
Dragouf
  • 4,500
  • 4
  • 41
  • 51
9
votes
5 answers

Tracking offline event with Google Analytics

I tried to track user activity in my site such as click or mouse over and different kind of events.... Is there any solution to track events even when users are working offline... Can I store them in something like cookie and send them to the server…
pooya
  • 881
  • 2
  • 13
  • 29
9
votes
1 answer

svn commit to trigger google analytics annotation?

I was wondering if there is a way to create a script that is triggered by an SVN commit, and which would add an annotation in a google analytics profile? This would be handy is something changes in a web app, which will have impact in the analytics…
b20000
  • 947
  • 1
  • 7
  • 24
9
votes
2 answers

Filtering results from Google Analytics Reporting API

I am successfully downloading results from Google Analytics using the reporting API (version 4), with the PHP client library. But I have not figured out how to correctly filter these results. I see how this would work via cURL, but not through the…
Charlie Hileman
  • 1,112
  • 9
  • 19
9
votes
2 answers

Adding Firebase Analytics and Google Analytics in Android App

I have implemented Firebase Analytics. It is working fine. I wish to use the Google Analytics as well. Based on the discussion here I have included the below object in the google-services.json "analytics_service": { "status": 2, …
9
votes
2 answers

Get Play store views and installs like "Google Play Referral Flow" with google analytics reporting api

I spent a few hours trying to get the "Play Store Views" and "Installs" metrics but I didn't found it how. I checked the documentation where you could find all the dimensions/metrics but those are not there. I hope someone from the google analytics…
Pablo
  • 1,298
  • 12
  • 18
9
votes
1 answer

Google Analytics (v3.03) for iOS - not receiving data

I am having a wired problem with Google analytics for iOS. According to console, it seems that I am sending data, but when I look at realtime overview in Google Analytics, I see no response from my actions in the app. This is how I have implemented…