参与我们的开发者问卷调查。期待收到您的反馈意见,以便我们了解如何改进 Google Analytics(分析),让这款工具更好地为您服务。

Google Analytics - All Configuration API Changelogs

This page documents any changes made to Google Analytics Configuration APIs. It includes changelogs for the Provisioning API and Management API. We recommend that API developers periodically check this list for any new announcements. You can also subscribe to changes via the feeds listed under the Subscribe section below.

Subscribe To Related Changelogs

Includes all Collection, Configuration, and Reporting APIs.

Includes Management API and Provisioning API.

User data retention settings in the Management API

It is now possible to programmatically configure the user data retention settings using new ‘dataRetentionTtl’ and ‘dataRetentionResetOnNewActivity’ fields added to the WebProperty resource.

This is the initial release of the User Deletion API:

  • The User Deletion API allows a Google Analytics customer to delete data for a given end user from a project or web property. User Deletion requests can be made using either Firebase projects or Google Analytics properties. Visit the User Deletion API Overview for more details.

Write operations in the Management API

Write operations in the Management API (e.g. create, update, delete, patch) for Web Property, View (Profile), and Goal resources no longer require whitelisting. The default daily limit for all Write operations in the Management API is 50 writes/day. See Limits and Quotas page for more information.

Custom Metrics

This is a bug fix release; it fixes the issue where creating a Custom Metric of type TIME failed when min_value was not set. Requests without a min_value now create a custom metric with a default min_value of 0.

Currencies

This is a bug fix release; it fixes an issue where a subset of currencies were supported in the Analytics web interface but not in the API. This release adds support for the following currencies:

  • UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL

For more information see: - The Views (profiles) reference. - The Currency reference help center article.

Unsampled Reports

The unsampled reports API no longer has a 100 reports per day limit. The API uses the same per-property, per-day token system as when creating an unsampled report through the web interface.

Unsampled Reports

Unsampled reports that are not accessible to the current user will no longer have a download link inside the Management API response message. This behavior is now consistent with UI dashboard functionality where only report owners can see the download link for the generated document.

Views (Profiles)

This release adds the botFilteringEnabled property to the view (profile) resource. This property indicates whether bot filtering is enabled for a view (profile). See the View (Profiles) Reference docs for details.

Unsampled Reports

This release add the delete method to unsampled reports. See the Unsampled Reports Delete Reference docs for details.

Segments

This is a bug fix release. This release fixes an issue which would cause segments with currency values in the definition to appear incorrectly when calling the segments list method.

Segments

This is a bug fix release. This release fixes an issue which would cause users with private segments pinned to multiple views (profiles) to get a 500 error response when calling the segments list method.

This release adds an additional parameter to the Provisioning API TOS URL:

  • The addition of the URL parameter, provisioningSignup=false, fixes an issue which occurs when provisioning a Google Analytics account for a user without any Google Analytics accounts. Developers should update their code to add this parameter to the TOS URL.

Batching

With this release, in addition to general batching support, we have added special support for the User Permissions API. Batched User Permissions requests will see significant performance gains and reduced quota usage.

Views (Profiles)

With this release the View (Profile) currency property will now default to USD if not set during an insert operation. Also get and list operations will return USD on Views (Profiles) that were previously created without a currency property.

Filters

This release marks the final removal of the deprecated filter fields IS_MOBILE and IS_TABLET, which should be replaced with DEVICE_CATEGORY=mobile and DEVICE_CATEGORY=tablet. Insert, update and patch requests which set the filter fields to use IS_MOBILE and IS_TABLET will return an error.

Filters

This release adds support to use a custom dimension for a filter field by adding a fieldIndex property to all the filter details sections. For example it is now possible to set the filter expression with a "field": "CUSTOM_DIMENSION" and the "fieldIndex": "1" to have the filter work on the first custom dimension.

Goals

This release also fixes an issue when creating a goal with "comparisonValue": "0" would fail.

This release marks the final turndown and removal of the dailyUpload resouce. The dailyUpload resource was officially deprecated on June 20, 2014; all cost data import should now be done using the uploads resource.

The list method response for all collections now include an empty list for the items property when the collection contains no resources. Previously the items property would be omitted from the response. See the API Reference for complete details on queries and responses for Google Analytics configuration data.

A new DEVICE_CATEGORY filters field has been added and IS_MOBILE and IS_TABLET are now deprecated. Use DEVICE_CATEGORY=mobile and DEVICE_CATEGORY=tablet.

The View (Profile) resource now includes an enhancedECommerceTracking property that indicates whether Enhanced Ecommerce is enabled (true) or disabled (false).

This release includes new data import types and the deprecation of the dailyUpload resource.

Data Import

See the Data Import Developer Guide for details how to use the Management API to import data to your Google Analytics account.

Uploads

  • The upload resource now supports the following upload types:
    • Campaign Data
    • Content Data
    • Cost Data
    • Product Data
    • Refund Data
    • User Data
  • The upload resource has a new migrateDataImport method to migrate existing Cost Data customDataSources.

Daily Uploads Deprecation

  • The dailyUpload resource is now deprecated! see the Migration Guide for details on migrating to use the Data Import feature.
  • The dailyUpload resource will continue to work for six more months, at which point any remaining customDataSources with uploadType property set to analytics#dailyUploads will be automatically migrated and only work with the upload resource.
  • Current users of the dailyUpload resource should update their code and migrate to use the Upload resource as soon as possible.

This is the initial release of the Provisioning API:

  • The Provisioning API can be used to programmatically create new Google Analytics accounts. This API is invite-only and intended for qualified service providers and large partners. Visit the Provisioning API Overview for more details.

This release adds two new configuration APIs.

  • AdWords Links in the Management API allows you to create, list, get, update, patch, and delete links between Google AdWords accounts and Google Analytics properties and manage which Views (Profiles) are linked to Adwords data.

Filters

Unsampled Reports: Management API

A new resource is being added to the Management API called Unsampled Reports. Unsampled reports are Google Analytics (GA) reports that have been generated  using unsampled data.  Unsampled reports are currently only available to GA Premium users. 

Segments: Management API v2.4 & v3.0

The following changes have been made to the Segments Collection:

  • User and sequence segments are now supported in the API.
  • The Segments Collection now returns all built-in and custom session level and user level segments.
  • The definition property for segments will now use the new segments syntax. This includes definitions for existing session level segments which will change from definition: "" to definition: "sessions::condition::".
  • A new type property has been added to the Segment resource to indicate whether a segment is CUSTOM (i.e. created by a user in the web interface) or BUILT_IN (i.e. provided by Google Analytics).

Experiments

The following AdSense metrics can now be used as optimization objectives:

  • ga:adsenseAdsClicks — The number of times AdSense ads on your site were clicked.
  • ga:adsenseAdsViewed — The number of AdSense ads viewed. Multiple ads can be displayed within an Ad Unit.
  • ga:adsenseRevenue — The total revenue from AdSense ads.

New Account Summaries Collection

  • The AccountSummaries collection has been added to the Management API. It provides a summary of information for each account, property, and view (profile) an authorized user has access to in a single and fast request. See the Account Summaries Developer Guide for details.

The following changes have been made to default segments due to the deprecation of the ga:isMobile and ga:isTablet dimensions:

  • Segment gaid::-11 has been renamed from Mobile Traffic to Mobile and Tablet Traffic. The definition for this segment has been changed from ga:isMobile==Yes to ga:deviceCategory==mobile,ga:deviceCategory==tablet. Note that ga:isMobile included tablet traffic, which is reflected in the new definition. If you only want mobile traffic, excluding tablet, then switch to the new Mobile Traffic segment (gaid::-14).
  • Segment gaid::-13 definition has changed from ga:isTablet==Yes to ga:deviceCategory==tablet. This continues to represent Tablet Traffic.
  • Segment gaid::-14 has been added. The name of the segment is Mobile Traffic and the definition is ga:deviceCategory==mobile.

Bug Fixes:

  • Timezone information for views (profiles) has been fixed. Details: Before this fix, in certain cases when listing view (profiles) in the Management API, incorrect timezone information for a view (profile) was returned. Now timezone information for views (profiles) is consistent with what is set in the Google Analytics admin interface.

This release introduces write operations for Web Property, View (Profile), and Goal resources and a set of 3 new resources that enable User Permissions management.

Account Setup and Configuration APIs

  • Views (Profiles) can now be created, updated, patched, and deleted. Review the View (Profiles) reference for details on the new methods.
  • Web Properties and Goals can now be created, updated, and patched. Review the Web Properties reference and Goals reference for details on the new methods.
  • A single Web Property, View (Profile), or Goal can now be requested with the get method.
  • These features are currently available as a developer preview in limited beta. If you’re interested is signing up, request access to the beta.

User Permissions in the Management API

  • The new accountUserLinks resource enables the management of account permissions for users.
  • The new webpropertyUserLinks resource enables the management of property permissions for users.
  • The new profileUserLinks resource enables the management of view (profile) permissions for users.
  • Permissions for an authorized user are now available as part of the Account, Web Property and View (Profile) resources.
  • A new scope has been introduced and is required to manage user permissions. https://www.googleapis.com/auth/analytics.manage.users.
  • See the User Permissions Dev Guide for additional details.

As part of the new segments launch, we will be rolling out the following changes to the Segments Collection:

  • All Segment IDs will be changed from positive integers to alphanumeric strings. If you have saved users’ Segment IDs, we recommend you update them to use the new IDs.
  • The Segments Collection will only return the existing visit level segments. The new visitor, cohort, and sequence segments are currently not supported in the API.
  • The Segments Collection will continue to return the existing default segments with the same negative numeric IDs, however, the new default segments are currently not supported.

This release adds 2 new properties to the Webproperty resource:

  • profileCount - Returns profile count for a property. This allows you to filter properties that don’t have any profiles (i.e., profileCount = 0).
  • industryVertical - Returns the industry vertical/category selected for a property.

Bug Fixes:

  • The eCommerceTracking property of the Profile resource is now consistent with Ecommerce settings in the admin section of the web interface. Returns true when Ecommerce tracking is enabled, and false if not.
  • The Webproperty resource now includes a level property to indicate whether the web property is PREMIUM or STANDARD.
  • A new endpoint has been added to the Management API v3 to access and modify Experiments resources.
  • The Profile resource now includes a type property to identify whether a profile is configured for a Web site or App. The two possible values are: WEB or APP.

This release adds helpful error responses to the Management API.

  • New error codes, reasons, and descriptions have been added to the body of API error responses. All the codes have been documented for both the versions - Version 2.4 and Version 3.0 - of the Management API.

This release adds data, changes existing functionality and fixes a bug.

New Data

  • The Advanced Segment collection now contains a segmentId field that can be used in the Data Export API segment parameter.

Changes

  • The data type for max-results has been changed to integer.

  • The default and maximum value for max-results has been changed to 1000.

Bug Fixes

  • Accounts, web properties, and profiles for Google Website Optimizer experiments are no longer included in their corresponding collections.

This release adds two new versions of the API with many new features, and it deprecates the old version. The changes impact the way you request and handle data from the API.

Version 3.0

  • This is the latest major version of our API and is not backwards compatible. All future development of the API will be done on this version.

  • New data

    • Full representation of event goals
    • An internal web property ID that can be used to deep link into the GA user interface
    • Profile configurations for the default page and site search query parameters
  • Changes

Version 2.4

  • This is a minor version upgrade that is mostly backwards compatible with the existing Version 2.3.

  • Changes

    • A new quota policy
    • Integration with the Google APIs Console to manage API access and request more quota
    • Continued support for existing authorization mechanisms and OAuth 2.0
    • New URL to make requests: https://www.googleapis.com/analytics/v2.4/management/…
    • Responses in XML only
    • No support for the Google Data JavaScript client library
    • XML output consistent with version 2.3, so the other existing Google Data client libraries will continue to work.

Deprecation

  • We are announcing the deprecation of the legacy version 2.3 of the Management API. It will continue to work for two months, after which all v2.3 requests will return a v2.4 response.

This is the beta release of the Google Analytics Management API!

New Feeds

Updated Client Libraries

  • The Management API is being released in the same library as the Google Analytics Data Export API. Both Google Data Java and JavaScript libraries have been updated. Each feed can be accessed by specifying the appropriate feed URI to the libraries getManagementFeed() method.

New Documentation

  • A new section of the Google Analytics developer docs has been created to describe how the new Management API works.