试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
Method: properties.submitUserDeletion
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
HTTP 请求
POST https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*}:submitUserDeletion
网址采用 gRPC 转码语法。
路径参数
参数 |
name |
string
必需。要提交用户删除请求的媒体资源的名称。
|
请求正文
请求正文中包含结构如下的数据:
JSON 表示法 |
{
// Union field user can be only one of the following:
"userId": string,
"clientId": string,
"appInstanceId": string,
"userProvidedData": string
// End of list of possible types for union field user .
} |
字段 |
联合字段 user 。提交删除请求的用户 user 只能是以下用户之一: |
userId |
string
Google Analytics 用户 ID。
|
clientId |
string
Google Analytics 客户端 ID。
|
appInstanceId |
string
Firebase 应用实例 ID。
|
userProvidedData |
string
用户提供的数据。可以包含一个电子邮件地址或一个电话号码。 电子邮件地址应按如下方式进行规范化:
- 小写
- 针对 gmail.com/googlemail.com 地址,移除 @ 前面的句点
- 移除所有空格
电话号码应按如下方式进行规范化:
|
响应正文
针对 properties.submitUserDeletion RPC 的响应消息。
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"deletionRequestTime": string
} |
字段 |
deletionRequestTime |
string (Timestamp format)
标记一个时间点,该时间点之前的所有访问者数据都应被删除。此属性设置为收到删除请求的时间。 采用 RFC 3339 标准,生成的输出将始终在末尾带 Z,并使用 0、3、6 或 9 个小数位。不带“Z”的偏差时间也是可以接受的。示例:"2014-10-02T15:01:23Z" 、"2014-10-02T15:01:23.045123456Z" 或 "2014-10-02T15:01:23+05:30" 。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/analytics.edit
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-19。
[null,null,["最后更新时间 (UTC):2025-08-19。"],[],[],null,["# Method: properties.submitUserDeletion\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SubmitUserDeletionResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nSubmits a request for user deletion for a property.\n\n### HTTP request\n\n`POST https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*}:submitUserDeletion`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|--------------------------------------------------------------------------|\n| `name` | `string` Required. The name of the property to submit user deletion for. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { // Union field `user` can be only one of the following: \"userId\": string, \"clientId\": string, \"appInstanceId\": string, \"userProvidedData\": string // End of list of possible types for union field `user`. } ``` |\n\n| Fields ||\n|--------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Union field `user`. The user to submit a deletion request for `user` can be only one of the following: ||\n| `userId` | `string` Google Analytics [user ID](https://firebase.google.com/docs/analytics/userid). |\n| `clientId` | `string` Google Analytics [client ID](https://support.google.com/analytics/answer/11593727). |\n| `appInstanceId` | `string` Firebase [application instance ID](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.html#getAppInstanceId). |\n| `userProvidedData` | `string` [User-provided data](https://support.google.com/analytics/answer/14077171). May contain either one email address or one phone number. Email addresses should be normalized as such: - lowercase - remove periods before @ for gmail.com/googlemail.com addresses - remove all spaces Phone numbers should be normalized as such: - remove all non digit characters - add + prefix |\n\n### Response body\n\nResponse message for properties.submitUserDeletion RPC.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------|\n| ``` { \"deletionRequestTime\": string } ``` |\n\n| Fields ||\n|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `deletionRequestTime` | `string (`[Timestamp](https://protobuf.dev/reference/protobuf/google.protobuf/#timestamp)` format)` Marks the moment for which all visitor data before this point should be deleted. This is set to the time at which the deletion request was received. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than \"Z\" are also accepted. Examples: `\"2014-10-02T15:01:23Z\"`, `\"2014-10-02T15:01:23.045123456Z\"` or `\"2014-10-02T15:01:23+05:30\"`. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/analytics.edit`"]]