Untuk mendiskusikan dan memberikan masukan tentang produk kami, bergabunglah ke channel Discord Google Ads resmi di server Komunitas Iklan dan Pengukuran Google.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Kasus penggunaan ini merangkum performa akun selama 30 hari terakhir menurut kampanye, yang dikelompokkan menurut perangkat. Kueri untuk laporan ini adalah sebagai berikut:
Tonton video panduan contoh kode yang menelusuri kampanye dengan metrik selama 7 hari terakhir. Contoh kode ini ditulis dalam Java, tetapi prosesnya serupa untuk semua bahasa.
[null,null,["Terakhir diperbarui pada 2025-09-05 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"]]