보고서에는 계정의 모든 리소스에 관한 정보가 제공됩니다.
캠페인, 광고 그룹, 통계에 관한 정보를 가져오고, 계정의 변경 내역을 변경하는 등의 작업을 할 수 있습니다. 보고 인프라는 Google Ads API를 기반으로 하며 GAQL을 사용하여 설정할 필드, 측정항목, 조건을 지정합니다.
보고서와 검색의 차이
신고에는 두 가지 주요 메커니즘이 있습니다. 두 API 모두 동일한 종류의 쿼리를 허용하며, 주로 결과를 반환하는 방식이 다릅니다.
이렇게 하면 검색 결과의 플랫한 사전과 같은 표현이 반환됩니다. row["campaign.id"] 및 row["metrics.impressions"]과 같은 사전을 사용하는 것처럼 필드에 직접 액세스할 수 있습니다. 이 형식을 사용하면 exportToSheet() 메서드를 사용하여 결과를 스프레드시트로 직접 내보낼 수 있습니다. 이 형식은 Google Ads API에서 결과가 반환되는 기본 형식이 아니므로 경우에 따라 이 형식에서 일부 필드를 사용할 수 없을 수 있습니다. 이 경우 search를 대신 사용해야 합니다.
AdsApp.search()
그러면 다양한 필드가 있는 GoogleAdsRow 객체 목록이 반환되며, 각 필드에는 하위 필드가 있을 수 있습니다. 따라서 row.campaign.id 및 row.metrics.impressions에 액세스하여 데이터를 가져옵니다. 일반적으로 데이터를 프로그래매틱 방식으로 처리하려는 경우에 더 유용하며, 일부 필드는 플랫 표현으로 변환할 수 없는 경우 search 형식으로만 제공될 수 있습니다.
보고서 예시
letreport=AdsApp.report("SELECT "+" ad_group.id, search_term_view.search_term, metrics.ctr, metrics.cost_micros, metrics.impressions "+"FROM search_term_view "+"WHERE metrics.impressions < 10 AND segments.date DURING LAST_30_DAYS");letrows=report.rows();while(rows.hasNext()){letrow=rows.next();letquery=row["search_term_view.search_term"];letimpressions=row["metrics.impressions"];}
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[[["\u003cp\u003eGoogle Ads scripts reporting uses GAQL to specify the data you want to retrieve, allowing you to access information about various resources like campaigns and ad groups.\u003c/p\u003e\n"],["\u003cp\u003eThere are two primary reporting methods: \u003ccode\u003eAdsApp.report()\u003c/code\u003e, which provides a flat, dictionary-like output suitable for spreadsheets, and \u003ccode\u003eAdsApp.search()\u003c/code\u003e, which returns \u003ccode\u003eGoogleAdsRow\u003c/code\u003e objects for programmatic processing.\u003c/p\u003e\n"],["\u003cp\u003eBoth \u003ccode\u003eAdsApp.report()\u003c/code\u003e and \u003ccode\u003eAdsApp.search()\u003c/code\u003e accept the same GAQL queries but differ in how they present the results, with some fields potentially exclusive to one method.\u003c/p\u003e\n"],["\u003cp\u003eWhile \u003ccode\u003eAdsApp.report()\u003c/code\u003e uses dictionary-like access (e.g., \u003ccode\u003erow["campaign.id"]\u003c/code\u003e), \u003ccode\u003eAdsApp.search()\u003c/code\u003e leverages object properties (e.g., \u003ccode\u003erow.campaign.id\u003c/code\u003e) and uses \u003ccode\u003elowerCamelCase\u003c/code\u003e for field names regardless of the query's casing.\u003c/p\u003e\n"]]],[],null,["# Reporting\n\nReports provide information about all the different resources in your account.\nYou can fetch information about campaigns, ad groups, and their stats, change\nhistory for your account, and more. The reporting infrastructure is backed by\nthe Google Ads API and uses [GAQL](/google-ads/api/docs/query/overview) to specify\nwhat fields, metrics, and conditions you want to set.\n\nReport vs. search\n-----------------\n\nThere are two main mechanisms for reporting. They both accept the same kinds of\nqueries, and differ primarily in how they return the results.\n\nFor both cases, we will use the following query: \n\n SELECT\n campaign.id,\n campaign.status,\n metrics.clicks,\n metrics.impressions,\n customer.id\n FROM campaign\n WHERE\n metrics.impressions \u003e 0\n\n`AdsApp.report()`\n: This will return a flat, dictionary-like representation of your search\n results. You can access fields as if using a dictionary, such as\n `row[\"campaign.id\"]` and `row[\"metrics.impressions\"]` directly. By using this\n format, you can export the results directly to a spreadsheet using the\n `exportToSheet()` method. This is not the native format that results are\n returned in by the Google Ads API, so in some cases some fields may not be available\n in this format. If that is the case, you should use `search` instead.\n\n`AdsApp.search()`\n: This will return a list of `GoogleAdsRow` objects, which have various fields,\n each of which may have sub-fields. So you would access `row.campaign.id` and\n `row.metrics.impressions` to fetch the data. This is generally more useful if\n you plan to process the data programmatically, and some fields may only be\n available in the `search` format if they cannot be converted to a flat\n representation.\n| **Note:** When using `AdsApp.search`, the fields returned will be in `lowerCamelCase` even though they are specified in `underscore_case` in the query. For example, if your field in the query is `campaign.start_date`, then to fetch the result from the row, you would use `campaign.startDate`.\n\nReport Example\n--------------\n\n let report = AdsApp.report(\n \"SELECT \" +\n \" ad_group.id, search_term_view.search_term, metrics.ctr, metrics.cost_micros, metrics.impressions \" +\n \"FROM search_term_view \" +\n \"WHERE metrics.impressions \u003c 10 AND segments.date DURING LAST_30_DAYS\");\n\n let rows = report.rows();\n while (rows.hasNext()) {\n let row = rows.next();\n let query = row[\"search_term_view.search_term\"];\n let impressions = row[\"metrics.impressions\"];\n }\n\nTake a look at the\n[`AdsApp.report`](/google-ads/scripts/docs/reference/adsapp/adsapp#report_query-optArgs)\ndocumentation for full details on using this view.\n\nSearch Example\n--------------\n\n let search = AdsApp.search(\n \"SELECT \" +\n \" ad_group.id, search_term_view.search_term, metrics.ctr, metrics.cost_micros, metrics.impressions \" +\n \"FROM search_term_view \" +\n \"WHERE metrics.impressions \u003c 10 AND segments.date DURING LAST_30_DAYS\");\n\n while (search.hasNext()) {\n let row = search.next();\n let query = row.searchTermView.searchTerm;\n let impressions = row.metrics.impressions;\n }\n\nConsult the full\n[`Adsapp.search`](/google-ads/scripts/docs/reference/adsapp/adsapp#search_query-optArgs)\ndocumentation for all possible settings."]]