Google Analytics | DataGrail Documentation

Google Analytics Integration Documentation

This documentation describes the technical capabilities of the DataGrail Google Analytics integration, including authorization, scopes/permissions, and utilized endpoints. For more information on how to integrate Google Analytics, visit our connection instructions.

Version

This integration utilizes the Google Analytics Reporting API & Management API v4 and v3, respectively.

Base URL

The base URL used for all Google Analytics API endpoints:

https://www.googleapis.com/

Authentication & Authorization

The DataGrail Google Analytics integration connects using OAuth 2.0.

Scopes

The Google Analytics integration requires specific scopes that must be granted in order to function for a given capability.

Scope Base Access Deletion
access_type: "offline" ✳️
prompt: "select_account consent" ✳️
analytics.readonly ✅ ✅
analytics.user.deletion ✅

✳️ optional scope

Base Scopes: All base scopes must be granted in order to connect the integration with DataGrail. The remaining scopes are only required if enabling those capabilities.

Endpoints Utilized

DataGrail uses the following endpoints to authorize and test the connection:

Method Endpoint Purpose
GET /o/oauth2/v2/authorize Request authorization
GET /oauth2/v4/token Get and refresh access token

Limits

Limits in Google Analytics are calculated using the leaky bucket algorithm. All requests that are made after rate limits have been exceeded are throttled and an HTTP 429 Too Many Requests error is returned. Requests succeed again after enough requests have emptied out of the bucket.

Capabilities

Access

DataGrail's Google Analytics integration provides Synchronous Access capabilities for the following supported identifier category: Google Analytics Client ID.

Data Interactions

For Access requests, DataGrail will take the following actions:

  1. Fetch a list of User Profiles.
  2. Search User Activity in the set of collected profiles by the User ID for the last week.

Endpoints Utilized

Method Endpoint Purpose
GET /analytics/v3/management/accounts/~all/webproperties/~all/profiles Fetch a list of the user's profiles
GET /v4/userActivity:search Search user activity

Deletion

DataGrail's Google Analytics integration provides Synchronous Deletion capabilities for the following supported identifier category: Google Analytics Client ID.

Data Interactions

For Deletion requests, DataGrail will take the following actions:

  1. Fetch a list of User Profiles.
  2. Search User Activity in the set of collected profiles by the User ID for the last week.
  3. Use the upsert method to request data deletion for a given user.
  4. Once deletion is requested, data associated with this user identifier will be removed from the Google Analytics Individual User Report within 72 hours, and then deleted from Analytics servers during the next deletion process. Deletion processes are scheduled to occur approximately every two months.

Reporting: Google Analytics reports based on previously aggregated data (i.e. user counts in the audience overview report), so reporting will be unaffected.

Endpoints Utilized

Method Endpoint Purpose
GET /analytics/v3/management/accounts/~all/webproperties/~all/profiles Fetch a list of the user's profiles
POST /analytics/v3/userDeletion/userDeletionRequests:upsert Request data deletion
GET /v4/userActivity:search Search user activity

Need help?

If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.