Chỉ số tiêu chí
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.
Trong Google Ads API, mỗi báo cáo tiêu chí được biểu thị bằng một tài nguyên riêng biệt.
Trừ phi cần thiết, tài nguyên *_view
chỉ chứa một trường resource_name
.
Các ứng dụng API Google Ads phải chỉ định các trường ad_group_criterion
hoặc campaign_criterion
tương ứng nếu cần tìm nạp dữ liệu cụ thể theo tiêu chí.
Điều này cho phép các ứng dụng API Google Ads yêu cầu các trường ad_group_criterion
hoặc campaign_criterion
và tài nguyên *_view
trong cùng một yêu cầu đối với phương thức GoogleAdsService.SearchStream
.
Yêu cầu truy vấn mẫu
SELECT
ad_group_criterion.keyword.text,
ad_group.name,
campaign.name,
metrics.impressions,
metrics.clicks,
metrics.ctr,
metrics.average_cpc
FROM keyword_view
WHERE segments.date DURING LAST_30_DAYS
Để truy xuất dữ liệu hiệu suất (chỉ số) cho một loại tiêu chí cụ thể, hãy chỉ định tài nguyên khung hiển thị tương ứng trong mệnh đề FROM
. Ví dụ: sử dụng keyword_view
trong mệnh đề FROM
và một số trường metrics
trong mệnh đề SELECT
để truy xuất các chỉ số về từ khoá.
Bạn có thể chọn các trường từ tài nguyên mẹ cho đến customer
trong chế độ xem tiêu chí. Ví dụ: khi chọn FROM
keyword_view
, bạn có thể yêu cầu các trường từ tất cả các tài nguyên sau:
ad_group_criterion
ad_group
campaign
customer
Để khám phá những tài nguyên có thể được yêu cầu theo cách này cho một tài nguyên nhất định, hãy kiểm tra hàng Tài nguyên thuộc tính trên trang tham chiếu của tài nguyên đó. Ví dụ: đối với keyword_view
, bạn có thể tìm thấy các tài nguyên của nó trên trang tham chiếu.
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-08-27 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eEach criteria report in the Google Ads API is a separate resource, and clients need to specify \u003ccode\u003ead_group_criterion\u003c/code\u003e or \u003ccode\u003ecampaign_criterion\u003c/code\u003e fields to fetch specific criteria data.\u003c/p\u003e\n"],["\u003cp\u003eTo get performance data for a criteria type, use its corresponding view resource (e.g., \u003ccode\u003ekeyword_view\u003c/code\u003e) in the \u003ccode\u003eFROM\u003c/code\u003e clause of your query.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve data from parent resources, like \u003ccode\u003ead_group\u003c/code\u003e, \u003ccode\u003ecampaign\u003c/code\u003e, and \u003ccode\u003ecustomer\u003c/code\u003e, when querying a criteria view.\u003c/p\u003e\n"],["\u003cp\u003eThe "Attribute Resources" section on a resource's reference page shows which related resources can be included in your queries.\u003c/p\u003e\n"]]],[],null,["# Criteria Metrics\n\nIn the Google Ads API, each criteria report is represented by a separate resource.\nUnless otherwise necessary, `*_view` resources contain only a `resource_name`\nfield.\n\nGoogle Ads API clients must specify corresponding `ad_group_criterion` or\n`campaign_criterion` fields if any criteria specific data needs to be fetched.\nThis lets Google Ads API clients request `ad_group_criterion` or `campaign_criterion`\nfields and the `*_view` resource in the same request to the\n[`GoogleAdsService.SearchStream`](/google-ads/api/reference/rpc/v21/GoogleAdsService/SearchStream)\nmethod.\n\nSample query request\n--------------------\n\n SELECT\n ad_group_criterion.keyword.text,\n ad_group.name,\n campaign.name,\n metrics.impressions,\n metrics.clicks,\n metrics.ctr,\n metrics.average_cpc\n FROM keyword_view\n WHERE segments.date DURING LAST_30_DAYS\n\nTo retrieve performance data (metrics) for a specific criteria type, specify its\ncorresponding view resource in the `FROM` clause. For example, use\n`keyword_view` in the `FROM` clause and some `metrics` fields in the `SELECT`\nclause to retrieve keyword metrics.\n\nYou can select fields from parent resources all the way up to `customer` from a\ncriteria view. For example, when selecting `FROM` the `keyword_view`, you can\nrequest fields from all of the following resources:\n\n- `ad_group_criterion`\n- `ad_group`\n- `campaign`\n- `customer`\n\nTo discover the resources that can be requested in this way for a given\nresource, check the **Attribute Resources** row of its reference page. For\nexample, for `keyword_view`, you can find its resources on its [reference\npage](/google-ads/api/fields/v21/keyword_view)."]]