Debian Codegraph @

docs/dyn/adsense_v2.accounts.reports.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="adsense_v2.html">AdSense Management API</a> . <a href="adsense_v2.accounts.html">accounts</a> . <a href="adsense_v2.accounts.reports.html">reports</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="adsense_v2.accounts.reports.saved.html">saved()</a></code>
79 </p>
80 <p class="firstline">Returns the saved Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#generate">generate(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">Generates an ad hoc report.</p>
88 <p class="toc_element">
89 <code><a href="#generateCsv">generateCsv(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p>
90 <p class="firstline">Generates a csv formatted ad hoc report.</p>
91 <p class="toc_element">
92 <code><a href="#getSaved">getSaved(name, x__xgafv=None)</a></code></p>
93 <p class="firstline">Gets the saved report from the given resource name.</p>
94 <h3>Method Details</h3>
95 <div class="method">
96 <code class="details" id="close">close()</code>
97 <pre>Close httplib2 connections.</pre>
98 </div>
99
100 <div class="method">
101 <code class="details" id="generate">generate(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code>
102 <pre>Generates an ad hoc report.
103
104 Args:
105 account: string, Required. The account which owns the collection of reports. Format: accounts/{account} (required)
106 currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account&#x27;s currency if not set.
107 dateRange: string, Date range of the report, if unset the range will be considered CUSTOM.
108 Allowed values
109 REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range.
110 CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided.
111 TODAY - Current day.
112 YESTERDAY - Yesterday.
113 MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].
114 YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].
115 LAST_7_DAYS - Last 7 days, excluding current day.
116 LAST_30_DAYS - Last 30 days, excluding current day.
117 dimensions: string, Dimensions to base the report on. (repeated)
118 Allowed values
119 DIMENSION_UNSPECIFIED - Unspecified dimension.
120 DATE - Date dimension in YYYY-MM-DD format (e.g. &quot;2010-02-10&quot;).
121 WEEK - Week dimension in YYYY-MM-DD format, representing the first day of each week (e.g. &quot;2010-02-08&quot;). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for &quot;en-GB&quot; or &quot;es&quot;, but a Sunday for &quot;en&quot; or &quot;fr-CA&quot;).
122 MONTH - Month dimension in YYYY-MM format (e.g. &quot;2010-02&quot;).
123 ACCOUNT_NAME - Account name. The members of this dimension match the values from Account.display_name.
124 AD_CLIENT_ID - Unique ID of an ad client. The members of this dimension match the values from AdClient.reporting_dimension_id.
125 HOSTED_AD_CLIENT_ID - Unique ID of a sub-account&#x27;s ad client. The members of this dimension match the values from AdClient.reporting_dimension_id (for the sub-account).
126 PRODUCT_NAME - Localized product name (e.g. &quot;AdSense for Content&quot;, &quot;AdSense for Search&quot;).
127 PRODUCT_CODE - Product code (e.g. &quot;AFC&quot;, &quot;AFS&quot;). The members of this dimension match the values from AdClient.product_code.
128 AD_UNIT_NAME - Ad unit name (within which an ad was served). The members of this dimension match the values from AdUnit.display_name.
129 AD_UNIT_ID - Unique ID of an ad unit (within which an ad was served). The members of this dimension match the values from AdUnit.reporting_dimension_id.
130 AD_UNIT_SIZE_NAME - Localized size of an ad unit (e.g. &quot;728x90&quot;, &quot;Responsive&quot;).
131 AD_UNIT_SIZE_CODE - The size code of an ad unit (e.g. &quot;728x90&quot;, &quot;responsive&quot;).
132 CUSTOM_CHANNEL_NAME - Custom channel name. The members of this dimension match the values from CustomChannel.display_name.
133 CUSTOM_CHANNEL_ID - Unique ID of a custom channel. The members of this dimension match the values from CustomChannel.reporting_dimension_id.
134 HOSTED_CUSTOM_CHANNEL_ID - Not supported.
135 OWNED_SITE_DOMAIN_NAME - Domain name of a verified site (e.g. &quot;example.com&quot;). The members of this dimension match the values from Site.domain.
136 OWNED_SITE_ID - Unique ID of a verified site. The members of this dimension match the values from Site.reporting_dimension_id.
137 PAGE_URL - URL of the page upon which the ad was served. This is a complete URL including scheme and query parameters. Note that the URL that appears in this dimension may be a canonicalized version of the one that was used in the original request, and so may not exactly match the URL that a user might have seen. Note that there are also some caveats to be aware of when using this dimension. For more information, see [Page URL breakdown](https://support.google.com/adsense/answer/11988478).
138 URL_CHANNEL_NAME - Name of a URL channel. The members of this dimension match the values from UrlChannel.uri_pattern.
139 URL_CHANNEL_ID - Unique ID of a URL channel. The members of this dimension match the values from UrlChannel.reporting_dimension_id.
140 BUYER_NETWORK_NAME - Name of an ad network that returned the winning ads for an ad request (e.g. &quot;Google AdWords&quot;). Note that unlike other &quot;NAME&quot; dimensions, the members of this dimensions are not localized.
141 BUYER_NETWORK_ID - Unique (opaque) ID of an ad network that returned the winning ads for an ad request.
142 BID_TYPE_NAME - Localized bid type name (e.g. &quot;CPC bids&quot;, &quot;CPM bids&quot;) for a served ad.
143 BID_TYPE_CODE - Type of a bid (e.g. &quot;cpc&quot;, &quot;cpm&quot;) for a served ad.
144 CREATIVE_SIZE_NAME - Localized creative size name (e.g. &quot;728x90&quot;, &quot;Dynamic&quot;) of a served ad.
145 CREATIVE_SIZE_CODE - Creative size code (e.g. &quot;728x90&quot;, &quot;dynamic&quot;) of a served ad.
146 DOMAIN_NAME - Localized name of a host on which an ad was served, after IDNA decoding (e.g. &quot;www.google.com&quot;, &quot;Web caches and other&quot;, &quot;bücher.example&quot;).
147 DOMAIN_CODE - Name of a host on which an ad was served (e.g. &quot;www.google.com&quot;, &quot;webcaches&quot;, &quot;xn--bcher-kva.example&quot;).
148 COUNTRY_NAME - Localized region name of a user viewing an ad (e.g. &quot;United States&quot;, &quot;France&quot;).
149 COUNTRY_CODE - CLDR region code of a user viewing an ad (e.g. &quot;US&quot;, &quot;FR&quot;).
150 PLATFORM_TYPE_NAME - Localized platform type name (e.g. &quot;High-end mobile devices&quot;, &quot;Desktop&quot;).
151 PLATFORM_TYPE_CODE - Platform type code (e.g. &quot;HighEndMobile&quot;, &quot;Desktop&quot;).
152 TARGETING_TYPE_NAME - Localized targeting type name (e.g. &quot;Contextual&quot;, &quot;Personalized&quot;, &quot;Run of Network&quot;).
153 TARGETING_TYPE_CODE - Targeting type code (e.g. &quot;Keyword&quot;, &quot;UserInterest&quot;, &quot;RunOfNetwork&quot;).
154 TRAFFIC_SOURCE_NAME - Localized traffic source name (e.g. &quot;Google&quot;, &quot;Bing&quot;, &quot;Facebook&quot;, &quot;Other&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
155 TRAFFIC_SOURCE_CODE - Traffic source code (e.g. &quot;GOOGLE&quot;, &quot;BING&quot;, &quot;FACEBOOK&quot;, &quot;OTHER&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
156 CONTENT_PLATFORM_NAME - Localized content platform name an ad request was made from (e.g. &quot;AMP&quot;, &quot;Web&quot;).
157 CONTENT_PLATFORM_CODE - Content platform code an ad request was made from (e.g. &quot;AMP&quot;, &quot;HTML&quot;).
158 AD_PLACEMENT_NAME - Localized ad placement name (e.g. &quot;Ad unit&quot;, &quot;Global settings&quot;, &quot;Manual&quot;).
159 AD_PLACEMENT_CODE - Ad placement code (e.g. &quot;AD_UNIT&quot;, &quot;ca-pub-123456:78910&quot;, &quot;OTHER&quot;).
160 REQUESTED_AD_TYPE_NAME - Localized requested ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
161 REQUESTED_AD_TYPE_CODE - Requested ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
162 SERVED_AD_TYPE_NAME - Localized served ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
163 SERVED_AD_TYPE_CODE - Served ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
164 AD_FORMAT_NAME - Localized ad format name indicating the way an ad is shown to the users on your site (e.g. &quot;In-page&quot;, &quot;Anchor&quot;, &quot;Vignette&quot;).
165 AD_FORMAT_CODE - Ad format code indicating the way an ad is shown to the users on your site (e.g. &quot;ON_PAGE&quot;, &quot;ANCHOR&quot;, &quot;INTERSTITIAL&quot;).
166 CUSTOM_SEARCH_STYLE_NAME - Custom search style name.
167 CUSTOM_SEARCH_STYLE_ID - Custom search style id.
168 DOMAIN_REGISTRANT - Domain registrants.
169 WEBSEARCH_QUERY_STRING - Query strings for web searches.
170 OS_TYPE_NAME - Localized operating system type name (e.g. &quot;Windows&quot;, &quot;MacOS&quot;, &quot;Android&quot;). For more information, see [Operating system breakdown](https://support.google.com/adsense/answer/16853822).
171 OS_TYPE_CODE - Operating system type code (e.g. &quot;WINDOWS&quot;, &quot;MAC&quot;, &quot;ANDROID&quot;). For more information, see [Operating system breakdown](https://support.google.com/adsense/answer/16853822).
172 BROWSER_TYPE_NAME - Localized browser type name (e.g. &quot;Google Chrome&quot;, &quot;Firefox&quot;, &quot;Safari&quot;). For more information, see [Browser breakdown](https://support.google.com/adsense/answer/16851903).
173 BROWSER_TYPE_CODE - Browser type code (e.g. &quot;CHROME&quot;, &quot;FIREFOX&quot;, &quot;SAFARI&quot;). For more information, see [Browser breakdown](https://support.google.com/adsense/answer/16851903).
174 WEBVIEW_TYPE_NAME - Localized webview type name (e.g. &quot;Webview (Uncategorized)&quot;, &quot;Non-webview&quot;). For more information, see [Hosting App breakdown](https://support.google.com/adsense/answer/16853515).
175 WEBVIEW_TYPE_CODE - Webview type code (e.g. &quot;UNCATEGORIZED&quot;, &quot;NONE&quot;). For more information, see [Hosting App breakdown](https://support.google.com/adsense/answer/16853515).
176 endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
177 endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
178 endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
179 filters: string, A list of [filters](/adsense/management/reporting/filtering) to apply to the report. All provided filters must match in order for the data to be included in the report. (repeated)
180 languageCode: string, The language to use for translating report output. If unspecified, this defaults to English (&quot;en&quot;). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
181 limit: integer, The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.
182 metrics: string, Required. Reporting metrics. (repeated)
183 Allowed values
184 METRIC_UNSPECIFIED - Unspecified metric.
185 PAGE_VIEWS - Number of page views.
186 AD_REQUESTS - Number of ad units that requested ads (for content ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.
187 MATCHED_AD_REQUESTS - Requests that returned at least one ad.
188 TOTAL_IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
189 IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
190 INDIVIDUAL_AD_IMPRESSIONS - Ads shown. Different ad formats will display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.
191 CLICKS - Number of times a user clicked on a standard content ad.
192 PAGE_VIEWS_SPAM_RATIO - Fraction of page views considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
193 AD_REQUESTS_SPAM_RATIO - Fraction of ad requests considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
194 MATCHED_AD_REQUESTS_SPAM_RATIO - Fraction of ad requests that returned ads considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
195 IMPRESSIONS_SPAM_RATIO - Fraction of impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
196 INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO - Fraction of ad impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
197 CLICKS_SPAM_RATIO - Fraction of clicks considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
198 AD_REQUESTS_COVERAGE - Ratio of requested ad units or queries to the number returned to the site.
199 PAGE_VIEWS_CTR - Ratio of individual page views that resulted in a click.
200 AD_REQUESTS_CTR - Ratio of ad requests that resulted in a click.
201 MATCHED_AD_REQUESTS_CTR - Ratio of clicks to matched requests.
202 IMPRESSIONS_CTR - Ratio of IMPRESSIONS that resulted in a click.
203 INDIVIDUAL_AD_IMPRESSIONS_CTR - Ratio of individual ad impressions that resulted in a click.
204 ACTIVE_VIEW_MEASURABILITY - Ratio of requests that were measurable for viewability.
205 ACTIVE_VIEW_VIEWABILITY - Ratio of requests that were viewable.
206 ACTIVE_VIEW_TIME - Mean time an ad was displayed on screen.
207 ESTIMATED_EARNINGS - Estimated earnings of the publisher. Note that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.
208 PAGE_VIEWS_RPM - Revenue per thousand page views. This is calculated by dividing the estimated revenue by the number of page views multiplied by 1000.
209 AD_REQUESTS_RPM - Revenue per thousand ad requests. This is calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.
210 MATCHED_AD_REQUESTS_RPM - Revenue per thousand matched ad requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.
211 IMPRESSIONS_RPM - Revenue per thousand ad impressions. This is calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.
212 INDIVIDUAL_AD_IMPRESSIONS_RPM - Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.
213 COST_PER_CLICK - Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.
214 ADS_PER_IMPRESSION - Number of ad views per impression.
215 TOTAL_EARNINGS - Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.
216 WEBSEARCH_RESULT_PAGES - Number of results pages. This metric can only be used when generating a report in the Google timezone, not the account timezone. Since the account timezone is the default for report generation, this metric can only be used by explicitly specifying `reportingTimeZone=GOOGLE_TIME_ZONE`.
217 FUNNEL_REQUESTS - Number of requests for non-ad units (for example a related search unit). For more information, see [Funnel requests](https://support.google.com/adsense/answer/11586959).
218 FUNNEL_IMPRESSIONS - Number of requests for non-ad units ads that returned content that was shown to the user. For more information, see [Funnel impressions](https://support.google.com/adsense/answer/11585767).
219 FUNNEL_CLICKS - Number of times a user clicked on a non-ad unit, triggering further ad requests. For more information, see [Funnel clicks](https://support.google.com/adsense/answer/11586382).
220 FUNNEL_RPM - Revenue per thousand funnel impressions. This is calculated by dividing estimated revenue by the number of funnel impressions multiplied by 1000. For more information, see [Funnel RPM](https://support.google.com/adsense/answer/11585979).
221 orderBy: string, The name of a dimension or metric to sort the resulting report on, can be prefixed with &quot;+&quot; to sort ascending or &quot;-&quot; to sort descending. If no prefix is specified, the column is sorted ascending. (repeated)
222 reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
223 Allowed values
224 REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone.
225 ACCOUNT_TIME_ZONE - Use the account timezone in the report.
226 GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles).
227 startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
228 startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
229 startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
230 x__xgafv: string, V1 error format.
231 Allowed values
232 1 - v1 error format
233 2 - v2 error format
234
235 Returns:
236 An object of the form:
237
238 { # Result of a generated report.
239 &quot;averages&quot;: { # Row representation. # The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
240 &quot;cells&quot;: [ # Cells in the row.
241 { # Cell representation.
242 &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
243 },
244 ],
245 },
246 &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. End date of the range (inclusive).
247 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
248 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
249 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
250 },
251 &quot;headers&quot;: [ # The header information; one for each dimension in the request, followed by one for each metric in the request.
252 { # The header information of the columns requested in the report.
253 &quot;currencyCode&quot;: &quot;A String&quot;, # The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) of this column. Only present if the header type is METRIC_CURRENCY.
254 &quot;name&quot;: &quot;A String&quot;, # Required. Name of the header.
255 &quot;type&quot;: &quot;A String&quot;, # Required. Type of the header.
256 },
257 ],
258 &quot;rows&quot;: [ # The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request.
259 { # Row representation.
260 &quot;cells&quot;: [ # Cells in the row.
261 { # Cell representation.
262 &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
263 },
264 ],
265 },
266 ],
267 &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. Start date of the range (inclusive).
268 &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
269 &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
270 &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
271 },
272 &quot;totalMatchedRows&quot;: &quot;A String&quot;, # The total number of rows matched by the report request.
273 &quot;totals&quot;: { # Row representation. # The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
274 &quot;cells&quot;: [ # Cells in the row.
275 { # Cell representation.
276 &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
277 },
278 ],
279 },
280 &quot;warnings&quot;: [ # Any warnings associated with generation of the report. These warnings are always returned in English.
281 &quot;A String&quot;,
282 ],
283 }</pre>
284 </div>
285
286 <div class="method">
287 <code class="details" id="generateCsv">generateCsv(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code>
288 <pre>Generates a csv formatted ad hoc report.
289
290 Args:
291 account: string, Required. The account which owns the collection of reports. Format: accounts/{account} (required)
292 currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account&#x27;s currency if not set.
293 dateRange: string, Date range of the report, if unset the range will be considered CUSTOM.
294 Allowed values
295 REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range.
296 CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided.
297 TODAY - Current day.
298 YESTERDAY - Yesterday.
299 MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].
300 YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].
301 LAST_7_DAYS - Last 7 days, excluding current day.
302 LAST_30_DAYS - Last 30 days, excluding current day.
303 dimensions: string, Dimensions to base the report on. (repeated)
304 Allowed values
305 DIMENSION_UNSPECIFIED - Unspecified dimension.
306 DATE - Date dimension in YYYY-MM-DD format (e.g. &quot;2010-02-10&quot;).
307 WEEK - Week dimension in YYYY-MM-DD format, representing the first day of each week (e.g. &quot;2010-02-08&quot;). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for &quot;en-GB&quot; or &quot;es&quot;, but a Sunday for &quot;en&quot; or &quot;fr-CA&quot;).
308 MONTH - Month dimension in YYYY-MM format (e.g. &quot;2010-02&quot;).
309 ACCOUNT_NAME - Account name. The members of this dimension match the values from Account.display_name.
310 AD_CLIENT_ID - Unique ID of an ad client. The members of this dimension match the values from AdClient.reporting_dimension_id.
311 HOSTED_AD_CLIENT_ID - Unique ID of a sub-account&#x27;s ad client. The members of this dimension match the values from AdClient.reporting_dimension_id (for the sub-account).
312 PRODUCT_NAME - Localized product name (e.g. &quot;AdSense for Content&quot;, &quot;AdSense for Search&quot;).
313 PRODUCT_CODE - Product code (e.g. &quot;AFC&quot;, &quot;AFS&quot;). The members of this dimension match the values from AdClient.product_code.
314 AD_UNIT_NAME - Ad unit name (within which an ad was served). The members of this dimension match the values from AdUnit.display_name.
315 AD_UNIT_ID - Unique ID of an ad unit (within which an ad was served). The members of this dimension match the values from AdUnit.reporting_dimension_id.
316 AD_UNIT_SIZE_NAME - Localized size of an ad unit (e.g. &quot;728x90&quot;, &quot;Responsive&quot;).
317 AD_UNIT_SIZE_CODE - The size code of an ad unit (e.g. &quot;728x90&quot;, &quot;responsive&quot;).
318 CUSTOM_CHANNEL_NAME - Custom channel name. The members of this dimension match the values from CustomChannel.display_name.
319 CUSTOM_CHANNEL_ID - Unique ID of a custom channel. The members of this dimension match the values from CustomChannel.reporting_dimension_id.
320 HOSTED_CUSTOM_CHANNEL_ID - Not supported.
321 OWNED_SITE_DOMAIN_NAME - Domain name of a verified site (e.g. &quot;example.com&quot;). The members of this dimension match the values from Site.domain.
322 OWNED_SITE_ID - Unique ID of a verified site. The members of this dimension match the values from Site.reporting_dimension_id.
323 PAGE_URL - URL of the page upon which the ad was served. This is a complete URL including scheme and query parameters. Note that the URL that appears in this dimension may be a canonicalized version of the one that was used in the original request, and so may not exactly match the URL that a user might have seen. Note that there are also some caveats to be aware of when using this dimension. For more information, see [Page URL breakdown](https://support.google.com/adsense/answer/11988478).
324 URL_CHANNEL_NAME - Name of a URL channel. The members of this dimension match the values from UrlChannel.uri_pattern.
325 URL_CHANNEL_ID - Unique ID of a URL channel. The members of this dimension match the values from UrlChannel.reporting_dimension_id.
326 BUYER_NETWORK_NAME - Name of an ad network that returned the winning ads for an ad request (e.g. &quot;Google AdWords&quot;). Note that unlike other &quot;NAME&quot; dimensions, the members of this dimensions are not localized.
327 BUYER_NETWORK_ID - Unique (opaque) ID of an ad network that returned the winning ads for an ad request.
328 BID_TYPE_NAME - Localized bid type name (e.g. &quot;CPC bids&quot;, &quot;CPM bids&quot;) for a served ad.
329 BID_TYPE_CODE - Type of a bid (e.g. &quot;cpc&quot;, &quot;cpm&quot;) for a served ad.
330 CREATIVE_SIZE_NAME - Localized creative size name (e.g. &quot;728x90&quot;, &quot;Dynamic&quot;) of a served ad.
331 CREATIVE_SIZE_CODE - Creative size code (e.g. &quot;728x90&quot;, &quot;dynamic&quot;) of a served ad.
332 DOMAIN_NAME - Localized name of a host on which an ad was served, after IDNA decoding (e.g. &quot;www.google.com&quot;, &quot;Web caches and other&quot;, &quot;bücher.example&quot;).
333 DOMAIN_CODE - Name of a host on which an ad was served (e.g. &quot;www.google.com&quot;, &quot;webcaches&quot;, &quot;xn--bcher-kva.example&quot;).
334 COUNTRY_NAME - Localized region name of a user viewing an ad (e.g. &quot;United States&quot;, &quot;France&quot;).
335 COUNTRY_CODE - CLDR region code of a user viewing an ad (e.g. &quot;US&quot;, &quot;FR&quot;).
336 PLATFORM_TYPE_NAME - Localized platform type name (e.g. &quot;High-end mobile devices&quot;, &quot;Desktop&quot;).
337 PLATFORM_TYPE_CODE - Platform type code (e.g. &quot;HighEndMobile&quot;, &quot;Desktop&quot;).
338 TARGETING_TYPE_NAME - Localized targeting type name (e.g. &quot;Contextual&quot;, &quot;Personalized&quot;, &quot;Run of Network&quot;).
339 TARGETING_TYPE_CODE - Targeting type code (e.g. &quot;Keyword&quot;, &quot;UserInterest&quot;, &quot;RunOfNetwork&quot;).
340 TRAFFIC_SOURCE_NAME - Localized traffic source name (e.g. &quot;Google&quot;, &quot;Bing&quot;, &quot;Facebook&quot;, &quot;Other&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
341 TRAFFIC_SOURCE_CODE - Traffic source code (e.g. &quot;GOOGLE&quot;, &quot;BING&quot;, &quot;FACEBOOK&quot;, &quot;OTHER&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
342 CONTENT_PLATFORM_NAME - Localized content platform name an ad request was made from (e.g. &quot;AMP&quot;, &quot;Web&quot;).
343 CONTENT_PLATFORM_CODE - Content platform code an ad request was made from (e.g. &quot;AMP&quot;, &quot;HTML&quot;).
344 AD_PLACEMENT_NAME - Localized ad placement name (e.g. &quot;Ad unit&quot;, &quot;Global settings&quot;, &quot;Manual&quot;).
345 AD_PLACEMENT_CODE - Ad placement code (e.g. &quot;AD_UNIT&quot;, &quot;ca-pub-123456:78910&quot;, &quot;OTHER&quot;).
346 REQUESTED_AD_TYPE_NAME - Localized requested ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
347 REQUESTED_AD_TYPE_CODE - Requested ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
348 SERVED_AD_TYPE_NAME - Localized served ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
349 SERVED_AD_TYPE_CODE - Served ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
350 AD_FORMAT_NAME - Localized ad format name indicating the way an ad is shown to the users on your site (e.g. &quot;In-page&quot;, &quot;Anchor&quot;, &quot;Vignette&quot;).
351 AD_FORMAT_CODE - Ad format code indicating the way an ad is shown to the users on your site (e.g. &quot;ON_PAGE&quot;, &quot;ANCHOR&quot;, &quot;INTERSTITIAL&quot;).
352 CUSTOM_SEARCH_STYLE_NAME - Custom search style name.
353 CUSTOM_SEARCH_STYLE_ID - Custom search style id.
354 DOMAIN_REGISTRANT - Domain registrants.
355 WEBSEARCH_QUERY_STRING - Query strings for web searches.
356 OS_TYPE_NAME - Localized operating system type name (e.g. &quot;Windows&quot;, &quot;MacOS&quot;, &quot;Android&quot;). For more information, see [Operating system breakdown](https://support.google.com/adsense/answer/16853822).
357 OS_TYPE_CODE - Operating system type code (e.g. &quot;WINDOWS&quot;, &quot;MAC&quot;, &quot;ANDROID&quot;). For more information, see [Operating system breakdown](https://support.google.com/adsense/answer/16853822).
358 BROWSER_TYPE_NAME - Localized browser type name (e.g. &quot;Google Chrome&quot;, &quot;Firefox&quot;, &quot;Safari&quot;). For more information, see [Browser breakdown](https://support.google.com/adsense/answer/16851903).
359 BROWSER_TYPE_CODE - Browser type code (e.g. &quot;CHROME&quot;, &quot;FIREFOX&quot;, &quot;SAFARI&quot;). For more information, see [Browser breakdown](https://support.google.com/adsense/answer/16851903).
360 WEBVIEW_TYPE_NAME - Localized webview type name (e.g. &quot;Webview (Uncategorized)&quot;, &quot;Non-webview&quot;). For more information, see [Hosting App breakdown](https://support.google.com/adsense/answer/16853515).
361 WEBVIEW_TYPE_CODE - Webview type code (e.g. &quot;UNCATEGORIZED&quot;, &quot;NONE&quot;). For more information, see [Hosting App breakdown](https://support.google.com/adsense/answer/16853515).
362 endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
363 endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
364 endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
365 filters: string, A list of [filters](/adsense/management/reporting/filtering) to apply to the report. All provided filters must match in order for the data to be included in the report. (repeated)
366 languageCode: string, The language to use for translating report output. If unspecified, this defaults to English (&quot;en&quot;). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
367 limit: integer, The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.
368 metrics: string, Required. Reporting metrics. (repeated)
369 Allowed values
370 METRIC_UNSPECIFIED - Unspecified metric.
371 PAGE_VIEWS - Number of page views.
372 AD_REQUESTS - Number of ad units that requested ads (for content ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.
373 MATCHED_AD_REQUESTS - Requests that returned at least one ad.
374 TOTAL_IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
375 IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
376 INDIVIDUAL_AD_IMPRESSIONS - Ads shown. Different ad formats will display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.
377 CLICKS - Number of times a user clicked on a standard content ad.
378 PAGE_VIEWS_SPAM_RATIO - Fraction of page views considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
379 AD_REQUESTS_SPAM_RATIO - Fraction of ad requests considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
380 MATCHED_AD_REQUESTS_SPAM_RATIO - Fraction of ad requests that returned ads considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
381 IMPRESSIONS_SPAM_RATIO - Fraction of impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
382 INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO - Fraction of ad impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
383 CLICKS_SPAM_RATIO - Fraction of clicks considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
384 AD_REQUESTS_COVERAGE - Ratio of requested ad units or queries to the number returned to the site.
385 PAGE_VIEWS_CTR - Ratio of individual page views that resulted in a click.
386 AD_REQUESTS_CTR - Ratio of ad requests that resulted in a click.
387 MATCHED_AD_REQUESTS_CTR - Ratio of clicks to matched requests.
388 IMPRESSIONS_CTR - Ratio of IMPRESSIONS that resulted in a click.
389 INDIVIDUAL_AD_IMPRESSIONS_CTR - Ratio of individual ad impressions that resulted in a click.
390 ACTIVE_VIEW_MEASURABILITY - Ratio of requests that were measurable for viewability.
391 ACTIVE_VIEW_VIEWABILITY - Ratio of requests that were viewable.
392 ACTIVE_VIEW_TIME - Mean time an ad was displayed on screen.
393 ESTIMATED_EARNINGS - Estimated earnings of the publisher. Note that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.
394 PAGE_VIEWS_RPM - Revenue per thousand page views. This is calculated by dividing the estimated revenue by the number of page views multiplied by 1000.
395 AD_REQUESTS_RPM - Revenue per thousand ad requests. This is calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.
396 MATCHED_AD_REQUESTS_RPM - Revenue per thousand matched ad requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.
397 IMPRESSIONS_RPM - Revenue per thousand ad impressions. This is calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.
398 INDIVIDUAL_AD_IMPRESSIONS_RPM - Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.
399 COST_PER_CLICK - Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.
400 ADS_PER_IMPRESSION - Number of ad views per impression.
401 TOTAL_EARNINGS - Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.
402 WEBSEARCH_RESULT_PAGES - Number of results pages. This metric can only be used when generating a report in the Google timezone, not the account timezone. Since the account timezone is the default for report generation, this metric can only be used by explicitly specifying `reportingTimeZone=GOOGLE_TIME_ZONE`.
403 FUNNEL_REQUESTS - Number of requests for non-ad units (for example a related search unit). For more information, see [Funnel requests](https://support.google.com/adsense/answer/11586959).
404 FUNNEL_IMPRESSIONS - Number of requests for non-ad units ads that returned content that was shown to the user. For more information, see [Funnel impressions](https://support.google.com/adsense/answer/11585767).
405 FUNNEL_CLICKS - Number of times a user clicked on a non-ad unit, triggering further ad requests. For more information, see [Funnel clicks](https://support.google.com/adsense/answer/11586382).
406 FUNNEL_RPM - Revenue per thousand funnel impressions. This is calculated by dividing estimated revenue by the number of funnel impressions multiplied by 1000. For more information, see [Funnel RPM](https://support.google.com/adsense/answer/11585979).
407 orderBy: string, The name of a dimension or metric to sort the resulting report on, can be prefixed with &quot;+&quot; to sort ascending or &quot;-&quot; to sort descending. If no prefix is specified, the column is sorted ascending. (repeated)
408 reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
409 Allowed values
410 REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone.
411 ACCOUNT_TIME_ZONE - Use the account timezone in the report.
412 GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles).
413 startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
414 startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
415 startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
416 x__xgafv: string, V1 error format.
417 Allowed values
418 1 - v1 error format
419 2 - v2 error format
420
421 Returns:
422 An object of the form:
423
424 { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
425 &quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
426 &quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
427 &quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
428 {
429 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
430 },
431 ],
432 }</pre>
433 </div>
434
435 <div class="method">
436 <code class="details" id="getSaved">getSaved(name, x__xgafv=None)</code>
437 <pre>Gets the saved report from the given resource name.
438
439 Args:
440 name: string, Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report} (required)
441 x__xgafv: string, V1 error format.
442 Allowed values
443 1 - v1 error format
444 2 - v2 error format
445
446 Returns:
447 An object of the form:
448
449 { # Representation of a saved report.
450 &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the report. Format: accounts/{account}/reports/{report}
451 &quot;title&quot;: &quot;A String&quot;, # Report title as specified by publisher.
452 }</pre>
453 </div>
454
455 </body></html>