google-analyticsgoogle-analytics-apigoogle-analytics-firebasegoogle-analytics-sdkgoogle-analytics-filters

Can you delete the user identifier Client ID using User Deletion API?


We are currently not collecting User IDs and enabled the GA IP anonymization.

So how can we delete the user's identifier Client ID?

https://developers.google.com/analytics/devguides/config/userdeletion/v3/reference/userDeletion/userDeletionRequest#resource

By looking at the script it seems that it requires the User ID so i believe that if we don't store User ID in our GA system then there is no way of achieving it right?


Solution

  • The JSON object should change based on the type, you have 3 options: enter image description here

    So if you want to delete a Standar Web Property:

    {
      "kind": "analytics#userDeletionRequest",
      "id": {
        "type": "CLIENT_ID",
        "userId": "188309123.12312312" // This is an example
      },
      "webPropertyId": "UA-XXXXX-X",   // Property attacked
      "deletionRequestTime": datetime   
    }
    

    Greeting