The Data Manager API is in closed beta. To express interest in joining the closed beta, fill out
this form.
Các phương pháp hay nhất
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Hãy ghi nhớ các phương pháp hay nhất sau đây khi sử dụng API Trình quản lý dữ liệu.
Gửi tất cả giá trị nhận dạng người dùng
Cho dù bạn gửi thành viên đối tượng hay sự kiện bằng UserData
, hãy thêm nhiều user_identifiers
nhất có thể, bao gồm cả việc gửi nhiều giá trị nhận dạng thuộc cùng một loại.
Ví dụ: nếu bạn có nhiều địa chỉ email cho một người dùng, hãy thêm một UserIdentifier
riêng biệt cho từng địa chỉ email. Tương tự, nếu bạn có nhiều loại giá trị nhận dạng cho một người dùng, chẳng hạn như địa chỉ email, số điện thoại và địa chỉ, hãy thêm một UserIdentifier
riêng biệt cho mỗi giá trị nhận dạng, lên đến số lượng giá trị nhận dạng tối đa.
Yêu cầu tối ưu hoá
Để giảm khả năng vượt quá giới hạn yêu cầu hằng ngày, hãy tạo lô nhiều mục nhất có thể trong mỗi yêu cầu, lên đến giới hạn cho mỗi yêu cầu.
Ví dụ: nếu bạn muốn thêm 10.000 thành viên đối tượng vào một đối tượng, hãy thêm tất cả 10.000 thành viên trong danh sách audience_members
vào một IngestAudienceMembersRequest
. Việc tạo lô tất cả 10.000 thành viên trong một yêu cầu sẽ hiệu quả hơn nhiều so với việc gửi yêu cầu riêng để thêm từng thành viên trong đối tượng.
Gửi yêu cầu đồng thời
Để giảm tổng thời gian cần thiết để nhập dữ liệu, hãy gửi các yêu cầu đồng thời đến IngestionService
. Bạn nên gửi đồng thời tối đa 10 yêu cầu để giảm khả năng vượt quá giới hạn số yêu cầu mỗi phút.
Bạn có thể gửi các yêu cầu đồng thời ngay cả khi các yêu cầu đó có cùng một destinations
.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["# Best practices\n\nKeep the following best practices in mind when using the Data Manager API.\n\nSend all user identifiers\n-------------------------\n\nWhether sending audience members or events with [`UserData`](/data-manager/api/reference/rpc/google.ads.datamanager.v1#userdata), include as many\n`user_identifiers` as possible, including sending multiple identifiers of the\nsame type.\n\nFor example, if you have multiple email addresses for a user, include a separate\n[`UserIdentifier`](/data-manager/api/reference/rpc/google.ads.datamanager.v1#useridentifier) for each email address. Similarly, if you have identifiers of\ndifferent types for a user, such as email addresses, phone numbers, and\naddresses, add a separate `UserIdentifier` for each identifier, up to the\n[maximum identifier count](/data-manager/api/limits#request_limits).\n\nOptimize requests\n-----------------\n\nTo reduce the likelihood of exceeding daily request limits, batch as many\nitems as possible in each request, up to the [per-request\nlimits](/data-manager/api/limits#request_limits).\n\nFor example, if you want to add 10,000 audience members to an audience, add all\n10,000 members in the `audience_members` list in one\n[`IngestAudienceMembersRequest`](/data-manager/api/reference/rpc/google.ads.datamanager.v1#ingestaudiencemembersrequest). Batching all 10,000 members\nin a single request is far more efficient than sending a separate request to add\neach audience member.\n\nSend concurrent requests\n------------------------\n\nTo reduce the overall time required to ingest data, send concurrent requests\nto the [`IngestionService`](/data-manager/api/reference/rpc/google.ads.datamanager.v1#ingestionservice). We recommend sending up to 10\nrequests concurrently to reduce the likelihood of exceeding the [requests per\nminute limit](/data-manager/api/limits#project_limits).\n\nYou can send concurrent requests even if the requests have the same\n`destinations`."]]