# 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**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teleskope.ai/the-platform/data-subject-rights/enroll-third-party-integrations/google-analytics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
