Guides developers through managing (adding, removing, and clearing) audience members for Google products using the Data Manager API and its associated client li
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-data-manager-api-audience-ingestion-fd4a172e6f58 ,按照其中的说明把「data-manager-api-audience-ingestion」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
data-manager-api-setup skill.product_destination_id needed for the ingestion or removal
requests.account_type field of the
operating_account in the Destination.| Destination | Audience Type | Accepted Data Types | Upload Guide | Remove All/Replace All Guide |
|---|---|---|---|---|
| Google Ads | Customer Match | composite_data.user_data (contact info), mobile_data (device IDs), user_id_data (user IDs) | Upload Data | Remove All/Replace All |
| Display & Video 360 (DV360) | Customer Match | composite_data.user_data (contact info), mobile_data (device IDs) | Upload Data | Remove All/Replace All |
[!IMPORTANT] If writing or updating an ingestion script, ALWAYS retrieve the relevant code sample to use as a reference:
| Language | Sample |
|---|---|
| Python | ingest_audience_members.py |
| Java | IngestAudienceMembers.java |
| PHP | ingest_audience_members.php |
| Node | ingest_audience_members.ts |
| .NET | IngestAudienceMembers.cs |
[!IMPORTANT] If refactoring code to upgrade from another Google API, ALWAYS extract the full contents of the relevant field mapping guide.
Implement the ingestion logic using the following checkpoints:
IngestionServiceClient).Destination object using the
product_destination_id and the appropriate account configurations:
operating_account (target account receiving data), login_account (if
authenticating using a manager account or a data partner account), and
linked_account (if you're a data partner accessing the account via a
partner link to a manager account). STRONGLY RECOMMENDED: Refer to the
Configure destinations and headers
guide for more details on configuring destinations.IngestAudienceMembersRequest or
RemoveAudienceMembersRequest, refer to Formatting User
Data to properly normalize and hash user identifiers using
the utility library.IngestAudienceMembersRequestRemoveAudienceMembersRequestRemoveAllAudienceMembersRequestvalidate_only boolean
option on the payload to allow developers to validate schemas without
actually applying changes.request_id for later diagnostics:
ingest_audience_membersremove_audience_membersremove_all_audience_membersuser_data for
ingest_audience_members or remove_audience_members, you must set the
encoding field on the IngestAudienceMembersRequest to HEX or BASE64.terms_of_service field is
required on the IngestAudienceMembersRequest to indicate the user has
accepted the policies.address field on UserIdentifier if all required fields
(postal_code, family_name, given_name, region_code) are present;
incomplete address fields will cause the API request to fail.product_destination_id must be a numeric string. It is NOT a resource
name.ConsentStatus are CONSENT_GRANTED and
CONSENT_DENIED. Do not use the values GRANTED and DENIED.UserIdentifier are email_address and phone_number. Do
not use the Google Ads API field names hashed_email and
hashed_phone_number.retrieve_request_status) if
validate_only is set to true.[!IMPORTANT] Refer to Understand API Errors for a detailed guide on how to understand the structure of errors and warnings returned by the API.
Periodically poll for status using exponential backoff, starting at least 30 minutes after sending the request.
client.retrieve_request_status using
RetrieveRequestStatusRequest(request_id=...).request_status_per_destination in the response to inspect
each target's request_status.request_status is SUCCESS,
PARTIAL_SUCCESS, or FAILED, inspect diagnostic values:
audience_members_ingestion_status (e.g.,
composite_data_ingestion_status).audience_members_removal_status (e.g.,
composite_data_removal_status).record_count (nested inside the data-type-specific
status object) which includes both success and failure.data_type_counts if uploading or removing
composite data, or mobile_id_count if uploading or removing
mobile IDs). Refer to the Diagnostics
Guide
for other count fields.user_data and
composite_data, check upload_match_rate_range nested inside the
status object.FAILED or PARTIAL_SUCCESS, inspect
each error's reason and record_count under
error_info.error_counts.reason and record_count
under warning_info.warning_counts (even if the destination status is
SUCCESS).ingest_audience_membersfield_warningsFieldWarningrequest_id) only indicates the payload
was received. To check if the records actually succeeded, partially
succeeded, or failed to process, query client.retrieve_request_status
using the request_id. Skipping this step is a common user mistake.