Để chỉ định vai trò Người quản lý báo cáo cho một tài khoản, hãy sử dụng
accounts.update đến
đặt trường reportingManager thành true. Vai trò Người quản lý báo cáo là
tương đương với vai trò Hiệu suất và thông tin chi tiết trong Merchant Center.
accounts.update thay thế toàn bộ tài nguyên Account. Sử dụng accounts.get để
nhận tài nguyên Account đầy đủ, sau đó cung cấp tất cả các trường trong
accounts.update để bạn không bị mất thông tin.
Truy vấn mẫu
Truy vấn sau đây truy xuất impressions, clicks và ctr cho tất cả
trong tài khoản của bạn trong khoảng thời gian 30 ngày cụ thể. Để đưa ra yêu cầu,
chuyển câu lệnh Ngôn ngữ truy vấn sau đây của Merchant Center đến
Phương thức reports.search:
SELECT
metrics.impressions,
metrics.clicks,
metrics.ctr
FROM MerchantPerformanceView
WHERE segments.date BETWEEN '2020-12-01' AND '2020-12-30'
Nhấp vào Run (Chạy) để dùng thử mẫu trong API Explorer. Sau khi bạn nhấp vào
Chạy, rồi cập nhật phần giữ chỗ mã người bán thành mã người bán của bạn trong
URL yêu cầu. Bạn có thể sửa đổi truy vấn. Truy vấn đầy đủ phải nằm trên một dòng để
làm việc với trình khám phá API.
Bạn cũng có thể phân đoạn
trong truy vấn để có báo cáo hiệu suất chi tiết hơn.
Hãy xem Hướng dẫn về sản phẩm để tìm hiểu cách
để truy xuất và lọc sản phẩm bằng dịch vụ Reports.
[[["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: 2024-09-20 UTC."],[[["The `Reports` service allows you to retrieve performance metrics, such as impressions, clicks, and click-through rate (CTR), for your account."],["To access this service, you must have the Reporting manager role (equivalent to the Performance and insights role in Merchant Center), which can be assigned using the `accounts.update` method."],["A comprehensive list of available metrics can be found in the `metrics` documentation, and you can use Merchant Center Query Language to create customized reports."],["For more detailed analysis, you can segment your metrics and further explore report functionalities through the provided guides on segmentation and products."]]],["The `Reports` service retrieves performance metrics, requiring the Reporting manager role. This role is enabled by setting `reportingManager` to `true` using `accounts.update`. To retain data, use `accounts.get` beforehand. `reports.search` uses Merchant Center Query Language, as demonstrated in a sample query that fetches `impressions`, `clicks`, and `ctr` for a given date range, and allows to run it in the API Explorer. Additionally, metrics can be segmented for detailed reports.\n"]]