Để thảo luận và đưa ra ý kiến phản hồi về các sản phẩm của chúng tôi, hãy tham gia kênh Discord chính thức của Google Ads trong máy chủ Cộng đồng quảng cáo và đo lường của Google.
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.
Trường hợp sử dụng này tóm tắt hiệu suất của một tài khoản trong 30 ngày qua theo chiến dịch, được phân đoạn theo thiết bị. Truy vấn cho báo cáo này như sau:
Xem video hướng dẫn về một đoạn mã mẫu tìm kiếm chiến dịch có các chỉ số trong 7 ngày qua. Mã mẫu này được viết bằng Java, nhưng quy trình này tương tự cho tất cả các ngôn ngữ.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-27 UTC."],[[["\u003cp\u003eThis page provides a Google Ads Query Language (GAQL) query to retrieve a 30-day performance summary of an account, segmented by campaign and device.\u003c/p\u003e\n"],["\u003cp\u003eYou can execute this query using the \u003ccode\u003eGoogleAdsService.SearchStream\u003c/code\u003e interface within the Google Ads API.\u003c/p\u003e\n"],["\u003cp\u003eThe page includes a complete HTTP request example, but it's recommended to utilize client libraries for seamless integration within applications.\u003c/p\u003e\n"],["\u003cp\u003eCode samples and a video walkthrough demonstrating campaign searches with metrics are also available for reference.\u003c/p\u003e\n"]]],[],null,["# Common Use Case Example\n\nThis use case summarizes the performance of an account over the last 30 days by\ncampaign, segmented by device. The query for this report is as follows: \n\n SELECT\n campaign.name,\n campaign.status,\n segments.device,\n metrics.impressions,\n metrics.clicks,\n metrics.ctr,\n metrics.average_cpc,\n metrics.cost_micros\n FROM campaign\n WHERE segments.date DURING LAST_30_DAYS\n\nTo issue this request, pass this Google Ads Query Language statement to the\n[`GoogleAdsService.SearchStream`](/google-ads/api/reference/rpc/v21/GoogleAdsService/SearchStream)\ninterface.\n| **Key Point:** This example shows the underlying HTTP request only as a teaching method. We encourage you to use one of the [client libraries](#code_samples) to submit requests in your own app.\n\nHTTP request URL\n----------------\n\nThe request consists of an HTTP POST to the Google Ads API server at the following URL: \n\n https://googleads.googleapis.com/v21/customers/{customer_id}/googleAds:searchStream\n\nComplete HTTP request sample\n----------------------------\n\nHere is a complete example of this report definition, enclosed in an HTTP POST\nrequest. \n\n```\nPOST /v21/customers/{customer_id}/googleAds:searchStream HTTP/1.1\nHost: googleads.googleapis.com\nUser-Agent: curl\nContent-Type: application/json\nAccept: application/json\nAuthorization: Bearer [Enter OAuth 2.0 access token here]\ndeveloper-token: [Enter developerToken here]\n\nParameters:\n{\n \"query\" : \"SELECT campaign.name, campaign.status, segments.device,\n metrics.impressions, metrics.clicks, metrics.ctr,\n metrics.average_cpc, metrics.cost_micros\n FROM campaign\n WHERE segments.date DURING LAST_30_DAYS\"\n}\n```\n\nCode samples\n------------\n\nWatch a video walkthrough of a code sample that searches campaigns with metrics\nover the last 7 days. This code sample is written in Java, but the process is\nsimilar for all languages.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]