ลองใช้เซิร์ฟเวอร์ MCP สำหรับ Google Analytics ติดตั้งจาก
GitHub และดูรายละเอียดเพิ่มเติมได้ที่
ประกาศ
Method: properties.submitUserDeletion
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ส่งคำขอให้ลบผู้ใช้สำหรับพร็อพเพอร์ตี้
คำขอ HTTP
POST https://analyticsadmin.googleapis.com/v1alpha/{name=properties/*}:submitUserDeletion
URL ใช้ไวยากรณ์การแปลงรหัส 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 .
} |
ช่อง |
ฟิลด์ Union user ผู้ใช้ที่ส่งคำขอให้ลบสำหรับ user จะต้องเป็นบุคคลใดบุคคลหนึ่งต่อไปนี้เท่านั้น |
userId |
string
รหัสผู้ใช้ Google Analytics
|
clientId |
string
รหัสไคลเอ็นต์ของ Google Analytics
|
appInstanceId |
string
รหัสอินสแตนซ์แอปพลิเคชัน Firebase
|
userProvidedData |
string
ข้อมูลที่ได้จากผู้ใช้ อาจมีอีเมลหรือหมายเลขโทรศัพท์อย่างใดอย่างหนึ่ง ควรทำให้ที่อยู่อีเมลเป็นปกติดังนี้
- ตัวพิมพ์เล็ก
- นำจุดที่อยู่ก่อน @ สำหรับอีเมล gmail.com/googlemail.com ออก
- นำช่องว่างทั้งหมดออก
หมายเลขโทรศัพท์ควรอยู่ในรูปแบบต่อไปนี้
- นำอักขระที่ไม่ใช่ตัวเลขทั้งหมดออก
- เพิ่มคำนำหน้า +
|
เนื้อหาการตอบกลับ
ข้อความตอบกลับสำหรับ RPC properties.submitUserDeletion
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
การแสดง 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 Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-19 UTC
[null,null,["อัปเดตล่าสุด 2025-08-19 UTC"],[],[],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`"]]