This document provides detailed reference on the structure of the Google Analytics Data Export API feeds. For client-library specific information, see the Developer Guide.
The Analytics Data Export API provides two main feed types: account feeds and data feeds. For all feeds, there are a number of considerations you should keep in mind:
max-results parameter
to request up to 10,000 rows. Use
the start-index along with the max-results parameter to page
through larger blocks of data.0 for start-index will
result in an error response from the server.Google Analytics account management consists of a number of layers that allow for a great deal of flexibility for tracking web properties and allowing user access to your reports. This section briefly summarizes the features and terms used in Analytics account management. For detailed information about Analytics accounts and profiles, see the Accounts and Profiles documentation.
| Google Account | Analytics uses Google Accounts to authenticate their users, just like many other Google products (e.g. Google Calendar, Gmail). You authenticate to Analytics with your Google Account ID, and then you can use any Analytics account you are authorized to use. |
|---|---|
| Analytics Account |
A Google Analytics account is a way for you to administer tracking for a collection of web properties.
|
| Account ID | When you create an account in Google Analytics, any web property that
you track in that account will use the same account ID, which is the central
portion of the web
property ID. For example, if the web property ID for your site is UA-10876-1,
then 10876 is the account ID. For Data Export API access,
the central number of the string (e.g. 10876) is used to
request feed data from a particular web property. |
| Web Property ID |
A web property ID is a string in the form of |
| Profile | Each Analytics account has one or more profiles.
|
| Profile ID | A profile ID is a globally-unique number assigned to a profile in an Analytics account. For example, if account In the Data Export API for Analytics, the profile ID is exposed in the
Account Feed as a |
| Table ID | A table ID is the unique, namespaced profile ID. In the Data Export API,
the table ID is exposed in both the Account Feed and Data Feed as dxp:tableId. The
table ID is required in the data feed request in order to retrieve data
from the correct profile. |
The login process for your client application determines two distinct things about the user accessing the feed data:
If Google Account login fails for the user, an error is returned. At this point in the process, the application is concerned only with authorization to Google Accounts in general. The purpose is to determine that the credentials entered by the user are indeed valid for that particular Google Account.
If Google Accounts login succeeds, the server next determines whether the user has access to the requested Google Analytics profile. The profile ID provided in the data feed is uniquely associated with an Analytics account, so the server can determine if the user has access to the Analytics account and to the particular profile associated with that account. Recall that a given user might have access to the particular Google Analytics account that you are querying, but might not have permissions to the particular profile in that account. If authorization for either the account or the profile fails, the server returns an error.