User Deletion API - Overview

This document provides a high level overview of the Google Analytics User Deletion API.


The Google Analytics User Deletion API allows customers to process deletions of data associated with a given user identifier. This tool is one of several tools available to help you safeguard your data.


The User Deletion API allows a Google Analytics customer to delete data for a given user identifier from a project or web property. User Deletion requests can be made using either Firebase projects or Google Analytics properties.

Requesting data deletion

Use the upsert method to request the data deletion for a given user. The upsert method takes a User Deletion Request Resource as its only parameter. A data deletion request can be applied to either a Google Analytics web property (specified by webPropertyId field) or a GA4 Property(specified by propertyId field). A user whose data will be deleted can be specified by setting one of the identifiers inside id.userId field. The type of the identifier must be specified inside id.type field. Supported user id types:

  • CLIENT_ID: Google Analytics Client ID (only supported when webPropertyId or propertyId field is set).
  • USER_ID: Google Analytics User ID (only supported when webPropertyId or propertyId field is set).
  • APP_INSTANCE_ID: Firebase application instance id (only supported when firebaseProjectId or propertyId field is set).

Learn more about User ID and Client ID features at Analytics Help Center.

Data deletion

The upsert method returns a User Deletion Request Resource with deletionRequestTime field set. The deletionRequestTime field marks the point in time at which the deletion request was received by Google Analytics.

The OAuth 2.0 scope is required to call the upsert method.