My favorites | English | Sign in

Faster apps faster - GWT 2.0 with Speed Tracer New!

Google Analytics (Labs)

Data API - Account Feed

This document provides detailed reference on the account feed for the Google Analytics Data Export API. For client-library specific information, see the Developer Guide.

Contents

  1. Overview
  2. Account Feed Request
  1. Account Feed Response

Overview

The account feed contains a list of Analytics profiles available to an authorized account user. As described in Getting Started, your application uses a table ID from the account feed in order to retrieve data for a specific profile. Data feed requests require this table ID in order to return the correct data from the Analytics account. You can manually construct the table ID by concatenating ga: with the profile ID (e,g. ga:1234) for your web property, which you can find in the Profile Settings page in the Analytics Administrative interface.

Account Feed Request

This section describes an account feed request with all the possible elements:

Account Feed URL

http://www.google.com/analytics/feeds/accounts/default
Required.
The secure URL prefix for the accounts feed, followed by the default string, which retrieves all account information the authenticated user has access to.

start-index Parameter

start-index=1
Optional.
The starting entry for the feed. If not supplied, the starting entry is 1. (Feed indexes are 1-based. That is, the first entry is entry 1, not entry 0.) Use this parameter as a pagination mechanism along with the max-results parameter.

max-results Parameter

max-results=50
Optional.
Maximum number of entries to include in this feed. The valid range of values is 1 through 10,000. You can use this in combination with start-index to retrieve a subset of elements, or use it alone to restrict the number of returned elements, starting with the first. If you do not use the max-results parameter in your query, your feed returns the default maximum of 1000 entries.

prettyprint Parameter

prettyprint=true
Optional.
Adds extra whitespace to the feed XML to make it more readable. This can be set to true or false, where the default is false. Use this parameter for debugging if you're looking at the feed responses directly.
Back to Top

Account Feed Response

This section displays the general structure of the account feed as returned in XML, with a description for each element.

  • Account Feed
    • id—a unique URI of the form http://www.google.com/analytics/feeds/accounts/liz@gmail.com
    • title—the string Account list for, followed by the name of the authenticated user
    • totalResults—the total number of results for the query, regardless of the number of results in the response
    • startIndex—the starting index of the entries, which is 1 by default or otherwise specified by the start-index query parameter
    • itemsPerPage—the number of items in the current request, which has a maximum of 1000
    • Feed Entry—contains the following property elements, each with a name and value
      • dxp:property name=ga:webPropertyId—The web property ID associated with the profile.
      • dxp:property name=ga:accountName—The name of the account associated with the profile.
      • dxp:property name=ga:accountId—The account ID associated with the profile, used in the tracking code for your web property (e.g. UA-30481-22).
      • dxp:property name=ga:profileId—The numeric ID of the profile.
      • dxp:property name=ga:currency—The currency type associated with the profile, such as USD (for U.S. dollars).
      • dxp:property name=ga:timezone—Setting this value processes your report the data in the time zone that the profile has been configured for. For example, but setting this value to GMT the day begins at 12am GMT, not 12am PST, which is the default value.
      • title—the name of the profile as seen in the Analytics administrative interface.
      • id—A string that uniquely identifies the entry. Example: http://www.google.com/analytics/feeds/accounts/ga:1234
      • dxp:tableId—The unique, namespaced profile ID to be used when requesting data from the Google Analytics data feed.
Back to Top