> For the complete documentation index, see [llms.txt](https://docs.teleskope.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.teleskope.ai/the-platform/data-subject-rights/enroll-third-party-integrations/google-analytics.md).

# Google Analytics

## Requirements

In order to integrate Teleskope with Google Analytics for DSR requests, you must have:

* Your Google Analytics **Property ID**. Follow Google's [docs](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id#google_analytics) to retrieve the property ID.
* A Google Analytics Admin to perform the integration.
* Permission to grant Teleskope the `https://www.googleapis.com/auth/analytics.edit` OAuth scope. Google requires this scope for the Google Analytics Admin API user deletion endpoint.

### Integrating with Google Analytics

To integrate Teleskope with Google Analytics:

1. Navigate to **Data Subject Rights** → **Third Party Integrations** and pick Google Analytics
2. Enter the Property ID you want to target and click save
3. Complete the Google OAuth flow with a Google Analytics Admin account

{% hint style="info" %}
If the integration was authorized before Google sunset the legacy User Deletion API, reauthorize Google Analytics so Teleskope receives a refresh token with the `analytics.edit` scope. Tokens granted only for the legacy `analytics.user.deletion` scope cannot submit deletion requests through the Google Analytics Admin API.
{% endhint %}

### Enroll Google Analytics for deletion requests <a href="#enroll-google-analytics-for-deletion-requests" id="enroll-google-analytics-for-deletion-requests"></a>

The following endpoint is available for deletion requests:

| Request Type | Endpoint Name GA                                                                                                                   | Endpoint Name in Teleskope |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| **Deletion** | [SubmitUserDeletion](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/properties/submitUserDeletion) | User                       |

### Parameter Defaults <a href="#parameter-defaults" id="parameter-defaults"></a>

Teleskope's Google Analytics integration deletes users across all specified GA4 properties.

| Parameter Name      | Default Value    | Notes                                                                                                                                             |
| ------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Property ID**     | *(Required)*     | Comma-separated list of GA4 Property IDs; no system default. The property ID is used in the Admin API request path as `properties/{property_id}`. |
| **Delete Strategy** | Split & Iterate  | Each property ID in the list receives an individual request.                                                                                      |
| **OAuth Scope**     | `analytics.edit` | Required by Google for `properties.submitUserDeletion`.                                                                                           |

Default Identifier for Google Analytics = **Client ID**
