Stay organized with collections Save and categorize content based on your preferences.
This document explains how you can delete data associated with a given user ID using the Google Analytics User Deletion API. This tool is one of several tools available to help you safeguard your data.
Important: The User Deletion API doesn't remove data from reports based on previously aggregated data, such as user counts in the audience overview report, or from other places you may have exported data to, such as BigQuery.For more details, see the reference documentation.
You can use Firebase projects or Google Analytics properties to send User Deletion API requests. The https://www.googleapis.com/auth/analytics.user.deletion OAuth 2.0 scope is required for the requests in this guide.
Send a deletion requestUse the upsert
method to request the data deletion for a given user. The upsert
method takes a userDeletionRequest
as its only parameter.
Specify the user whose data you want to delete by setting one of the IDs inside the id.userId
field. The type of the ID must be specified inside the id.type
field.
Here's a list of supported user ID types:
CLIENT_ID
: Google Analytics client ID (only supported when propertyId
field is set).USER_ID
: Google Analytics User ID (only supported when propertyId
field is set).APP_INSTANCE_ID
: Firebase application instance ID (only supported when firebaseProjectId
or propertyId
field is set).Each data deletion request processes only the ID submitted in that request.
If you have multiple IDs associated with the same user, you must submit separate deletion requests for each ID associated with that user. If you Use BigQuery export, you must also process your own deletions there.
Learn more about user IDs.
Deletion timelineThe upsert method returns a User Deletion Request Resource with the deletionRequestTime
field set. The deletionRequestTime
field tells you the time at which the deletion request was received by Google Analytics.
Once deletion is requested, data associated with the user ID will be removed from the Individual User Report within 72 hours, and then deleted from Analytics servers during the next deletion process. Deletion processes are scheduled to occur every two months. If you have exported the user data outside of Google Analytics, we recommend you delete it there first.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["The Google Analytics User Deletion API allows you to delete data associated with a specific user ID, helping safeguard user data."],["Data is removed from the Individual User Report within 72 hours of the request and permanently deleted from Analytics servers within two months."],["The API requires the `https://www.googleapis.com/auth/analytics.user.deletion` OAuth 2.0 scope and utilizes the `upsert` method for deletion requests."],["Supported user ID types for deletion include `CLIENT_ID`, `USER_ID`, and `APP_INSTANCE_ID`, requiring separate requests for each ID associated with a user."],["It's crucial to note that the API doesn't remove previously aggregated data or data exported to external platforms like BigQuery, requiring separate deletion processes."]]],["The Google Analytics User Deletion API allows deletion of user data using the `upsert` method with a `userDeletionRequest`. Specify the user's ID ( `CLIENT_ID`, `USER_ID`, or `APP_INSTANCE_ID`) and its type. Each ID requires a separate request. Data is removed from the Individual User Report within 72 hours and from Analytics servers within two months, but not from aggregated reports or external exports. OAuth 2.0 scope `https://www.googleapis.com/auth/analytics.user.deletion` is necessary.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3