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
1
vote
1 answer

Getting Lifetime Values from Google Analytics API

Google Analytics API documentation shows that, for fetching the lifetime values, the date ranges should not be specified. But when I make such a request (without date range), it returns empty dimension and metrics result. But when I use date range,…
Kenpachi
  • 511
  • 8
  • 20
1
vote
1 answer

Google Analytics API : Required parameter is missing: grant_type

So I'm creating a dashboard using dashing (sinatra based framework) and I need to get data from Analytics API, and display it in the dashboard. So I have the following ruby code, and the oauth returns this error: { "error" : "invalid_request", …
1
vote
2 answers

Filter Active Users based on page title- Google Analytics

I need to show active visitors on my website based on Page title. Example : If the user is Contact Us page, then onlycount of active visitors on 'Contact us' page is to be shown instead of entire site. I am following Embed API Third Party…
1
vote
1 answer

Python: Google-Analytics-API returns nothing. Is there something wrong within _win32_opener.py?

I have some problems getting data back via the Google Analytics API with python 3.5. I'm doing exactly what is written in https://developers.google.com/api-client-library/python/apis/analytics/v3#sample. I've downloaded the sample files which can…
Steve Iron
  • 171
  • 5
  • 12
1
vote
0 answers

Using custom dimension for segmenting in Google Analytics API produces unexpected results, why?

I am using custom dimension to send over session ids to Google Analytics, like this: ga('set', 'dimension1', '#{session.id}'); Now, I want to be able to retrieve couple of things from Google Analytics, precisely: age gender affinity…
Tomasz Giba
  • 452
  • 1
  • 6
  • 19
1
vote
1 answer

Incorrect AVG Session Duration?

I am setting up some google analytics API functions, but my average session duration doesn't seem to be correct. My typical average session duration is 4:10 however I am getting numbers such as 1144 (seconds) or 24.06 minutes. This is WAY off does…
1
vote
0 answers

Google Analytics C# api upload do not work

I am using google analytics api for C# v3 and I am trying to upload csv file for custom data set. But I am getting error that baseUri is missing. When I debug code under service object there is baseUri, and on internet I found some answers for this…
Skondiloza
  • 21
  • 1
  • 5
1
vote
3 answers

Google Analytics API + proxy

I built a Python 3.4 Web Application calling Google Analytics API. class GA: def __init__(self): self.scope = ['https://www.googleapis.com/auth/analytics.readonly'] self.service_account_email = 'my_account_email' …
Phil27
  • 223
  • 1
  • 3
  • 10
1
vote
0 answers

Google analytics API - check if demographics are enabled

I would like to use google analytics API, to query for unique users grouped by gender or age category.(metric ga:users, and dimension ga:userAgeBracket or ga:userGender) For this to work you have to enable 2 things in my GA account: Advertising…
1
vote
1 answer

Google Analytics unique events change when timeperiod is changed

I am tracking a number of events on a website and am trying to extract some analytics data via the api. The problem I have found can be boiled down to this scenario. If I want to know how many unique events have happened per day, I can run a query…
huesforalice
  • 2,263
  • 2
  • 21
  • 29
1
vote
0 answers

Programmatically checking valid combinations of metrics and dimensions for GA

Is there any programmatic way for checking valid combinations of metrics and dimensions? Analytics query explorer seem to be detecting it. Query explorer code is @…
Alen MJ
  • 116
  • 1
  • 5
1
vote
2 answers

GA Measurement Protocol: replace custom metric value

I have a custom metric in Google Analytics. I'm inserting it using Google Analytics Measurement Protocol. When I make a request to Google Analytics, is there a way to replace the existing value of the metric instead of adding new value to it? Let's…
Sergey
  • 39,828
  • 24
  • 80
  • 122
1
vote
1 answer

Update the Value of a Per-Session Custom Dimension Once Set?

I'm a writing a proof of concept involving GA Core Reporting API integration and would like to know if it's possible, after creation via: ga('create', 'UA-XXXXXX-X'); ga('send', 'pageview', { 'dimension1': '[Uid]' 'dimension2': '' }); ...…
G0dsquad
  • 3,452
  • 1
  • 12
  • 22
1
vote
1 answer

How to add the data to Google Analytis by using java (programmatically)

At the current moment, I am trying to understand how to add any data to GA. I read the data from my GA account using Core Reporting API and Managment API without any problems. But now I want to add the data (the number of phone calls) to GA account…
Delphian
  • 1,270
  • 3
  • 10
  • 27
1
vote
0 answers

Authentication for Google API

I'm trying to understand the flow how to authenticate user on WEB client (JS), and then use Google API on my back-end server (ASP.NET MVC application), on behalf of authenticated user for retrieving users contacts list. Here the current flow that I…
1 2 3
99
100