How to get data for multiple profiles in the Google Analytics Reporting API?

Is there a way to get information for multiple ids in a single GA reporting API request? See here a link to the tool I'm using: http://ga-dev-tools.appspot.com/explorer/

+6
source share
1 answer

The Google Analtyics Core Reporting API core is a bit confusing. Core Reporting API - Reference Guide - Identifiers invokes identifiers of query parameters, but in reality they are the only ones. You can send only one identifier at a time.

Anwser: there is no way to send more than one view (profile_id) to the Core report api as one request. You will need to program your request and send it several times.

Example:

 https://www.googleapis.com/analytics/v3/data/ga?ids=ga:34896749&dimensions=ga:date&metrics=ga:entrances&start-date=2014-05-12&end-date=2014-05-22&oauth_token={OauthToken} https://www.googleapis.com/analytics/v3/data/ga?ids=ga:34896744&dimensions=ga:date&metrics=ga:entrances&start-date=2014-05-12&end-date=2014-05-22&oauth_token={OauthToken} 
+9
source

Source: https://habr.com/ru/post/970908/


All Articles