OLD | NEW |
1 { | 1 { |
2 "auth": { | 2 "auth": { |
3 "oauth2": { | 3 "oauth2": { |
4 "scopes": { | 4 "scopes": { |
5 "https://www.googleapis.com/auth/analytics.readonly": { | 5 "https://www.googleapis.com/auth/analytics.readonly": { |
6 "description": "View your Google Analytics data" | 6 "description": "View your Google Analytics data" |
7 }, | 7 }, |
8 "https://www.googleapis.com/auth/analytics": { | 8 "https://www.googleapis.com/auth/analytics": { |
9 "description": "View and manage your Google Analytics data" | 9 "description": "View and manage your Google Analytics data" |
10 } | 10 } |
(...skipping 10 matching lines...) Expand all Loading... |
21 "icons": { | 21 "icons": { |
22 "x16": "http://www.google.com/images/icons/product/search-16.gif", | 22 "x16": "http://www.google.com/images/icons/product/search-16.gif", |
23 "x32": "http://www.google.com/images/icons/product/search-32.gif" | 23 "x32": "http://www.google.com/images/icons/product/search-32.gif" |
24 }, | 24 }, |
25 "id": "analyticsreporting:v4", | 25 "id": "analyticsreporting:v4", |
26 "kind": "discovery#restDescription", | 26 "kind": "discovery#restDescription", |
27 "name": "analyticsreporting", | 27 "name": "analyticsreporting", |
28 "ownerDomain": "google.com", | 28 "ownerDomain": "google.com", |
29 "ownerName": "Google", | 29 "ownerName": "Google", |
30 "parameters": { | 30 "parameters": { |
31 "access_token": { | 31 "oauth_token": { |
32 "description": "OAuth access token.", | 32 "description": "OAuth 2.0 token for the current user.", |
| 33 "location": "query", |
| 34 "type": "string" |
| 35 }, |
| 36 "bearer_token": { |
| 37 "description": "OAuth bearer token.", |
| 38 "location": "query", |
| 39 "type": "string" |
| 40 }, |
| 41 "upload_protocol": { |
| 42 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", |
33 "location": "query", | 43 "location": "query", |
34 "type": "string" | 44 "type": "string" |
35 }, | 45 }, |
36 "prettyPrint": { | 46 "prettyPrint": { |
37 "default": "true", | 47 "default": "true", |
38 "description": "Returns response with indentations and line breaks."
, | 48 "description": "Returns response with indentations and line breaks."
, |
39 "location": "query", | 49 "location": "query", |
40 "type": "boolean" | 50 "type": "boolean" |
41 }, | 51 }, |
42 "key": { | 52 "uploadType": { |
43 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", | 53 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", |
44 "location": "query", | 54 "location": "query", |
45 "type": "string" | 55 "type": "string" |
46 }, | 56 }, |
47 "quotaUser": { | |
48 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", | |
49 "location": "query", | |
50 "type": "string" | |
51 }, | |
52 "pp": { | |
53 "default": "true", | |
54 "description": "Pretty-print response.", | |
55 "location": "query", | |
56 "type": "boolean" | |
57 }, | |
58 "fields": { | 57 "fields": { |
59 "description": "Selector specifying which fields to include in a par
tial response.", | 58 "description": "Selector specifying which fields to include in a par
tial response.", |
60 "location": "query", | 59 "location": "query", |
61 "type": "string" | 60 "type": "string" |
62 }, | 61 }, |
63 "alt": { | |
64 "default": "json", | |
65 "description": "Data format for response.", | |
66 "enum": [ | |
67 "json", | |
68 "media", | |
69 "proto" | |
70 ], | |
71 "enumDescriptions": [ | |
72 "Responses with Content-Type of application/json", | |
73 "Media download with context-dependent Content-Type", | |
74 "Responses with Content-Type of application/x-protobuf" | |
75 ], | |
76 "location": "query", | |
77 "type": "string" | |
78 }, | |
79 "$.xgafv": { | 62 "$.xgafv": { |
80 "description": "V1 error format.", | 63 "description": "V1 error format.", |
81 "enum": [ | 64 "enum": [ |
82 "1", | 65 "1", |
83 "2" | 66 "2" |
84 ], | 67 ], |
85 "enumDescriptions": [ | 68 "enumDescriptions": [ |
86 "v1 error format", | 69 "v1 error format", |
87 "v2 error format" | 70 "v2 error format" |
88 ], | 71 ], |
89 "location": "query", | 72 "location": "query", |
90 "type": "string" | 73 "type": "string" |
91 }, | 74 }, |
92 "callback": { | 75 "callback": { |
93 "description": "JSONP", | 76 "description": "JSONP", |
94 "location": "query", | 77 "location": "query", |
95 "type": "string" | 78 "type": "string" |
96 }, | 79 }, |
97 "oauth_token": { | 80 "alt": { |
98 "description": "OAuth 2.0 token for the current user.", | 81 "default": "json", |
| 82 "description": "Data format for response.", |
| 83 "enum": [ |
| 84 "json", |
| 85 "media", |
| 86 "proto" |
| 87 ], |
| 88 "enumDescriptions": [ |
| 89 "Responses with Content-Type of application/json", |
| 90 "Media download with context-dependent Content-Type", |
| 91 "Responses with Content-Type of application/x-protobuf" |
| 92 ], |
99 "location": "query", | 93 "location": "query", |
100 "type": "string" | 94 "type": "string" |
101 }, | 95 }, |
102 "uploadType": { | 96 "key": { |
103 "description": "Legacy upload protocol for media (e.g. \"media\", \"
multipart\").", | 97 "description": "API key. Your API key identifies your project and pr
ovides you with API access, quota, and reports. Required unless you provide an O
Auth 2.0 token.", |
104 "location": "query", | 98 "location": "query", |
105 "type": "string" | 99 "type": "string" |
106 }, | 100 }, |
107 "bearer_token": { | 101 "access_token": { |
108 "description": "OAuth bearer token.", | 102 "description": "OAuth access token.", |
109 "location": "query", | 103 "location": "query", |
110 "type": "string" | 104 "type": "string" |
111 }, | 105 }, |
112 "upload_protocol": { | 106 "quotaUser": { |
113 "description": "Upload protocol for media (e.g. \"raw\", \"multipart
\").", | 107 "description": "Available to use for quota purposes for server-side
applications. Can be any arbitrary string assigned to a user, but should not exc
eed 40 characters.", |
114 "location": "query", | 108 "location": "query", |
115 "type": "string" | 109 "type": "string" |
| 110 }, |
| 111 "pp": { |
| 112 "default": "true", |
| 113 "description": "Pretty-print response.", |
| 114 "location": "query", |
| 115 "type": "boolean" |
116 } | 116 } |
117 }, | 117 }, |
118 "protocol": "rest", | 118 "protocol": "rest", |
119 "resources": { | 119 "resources": { |
120 "reports": { | 120 "reports": { |
121 "methods": { | 121 "methods": { |
122 "batchGet": { | 122 "batchGet": { |
123 "description": "Returns the Analytics data.", | 123 "description": "Returns the Analytics data.", |
124 "httpMethod": "POST", | 124 "httpMethod": "POST", |
125 "id": "analyticsreporting.reports.batchGet", | 125 "id": "analyticsreporting.reports.batchGet", |
(...skipping 10 matching lines...) Expand all Loading... |
136 "https://www.googleapis.com/auth/analytics", | 136 "https://www.googleapis.com/auth/analytics", |
137 "https://www.googleapis.com/auth/analytics.readonly" | 137 "https://www.googleapis.com/auth/analytics.readonly" |
138 ] | 138 ] |
139 } | 139 } |
140 } | 140 } |
141 } | 141 } |
142 }, | 142 }, |
143 "revision": "20161129", | 143 "revision": "20161129", |
144 "rootUrl": "https://analyticsreporting.googleapis.com/", | 144 "rootUrl": "https://analyticsreporting.googleapis.com/", |
145 "schemas": { | 145 "schemas": { |
146 "PivotHeader": { | 146 "OrFiltersForSegment": { |
147 "description": "The headers for each of the pivot sections defined i
n the request.", | 147 "description": "A list of segment filters in the `OR` group are comb
ined with the logical OR\noperator.", |
148 "id": "PivotHeader", | 148 "id": "OrFiltersForSegment", |
149 "properties": { | 149 "properties": { |
150 "totalPivotGroupsCount": { | 150 "segmentFilterClauses": { |
151 "description": "The total number of groups for this pivot.", | 151 "description": "List of segment filters to be combined with
a `OR` operator.", |
152 "format": "int32", | 152 "items": { |
153 "type": "integer" | 153 "$ref": "SegmentFilterClause" |
154 }, | 154 }, |
155 "pivotHeaderEntries": { | 155 "type": "array" |
156 "description": "A single pivot section header.", | |
157 "items": { | |
158 "$ref": "PivotHeaderEntry" | |
159 }, | |
160 "type": "array" | |
161 } | |
162 }, | |
163 "type": "object" | |
164 }, | |
165 "Metric": { | |
166 "description": "[Metrics](https://support.google.com/analytics/answe
r/1033861)\nare the quantitative measurements. For example, the metric `ga:users
`\nindicates the total number of users for the requested time period.", | |
167 "id": "Metric", | |
168 "properties": { | |
169 "alias": { | |
170 "description": "An alias for the metric expression is an alt
ernate name for the\nexpression. The alias can be used for filtering and sorting
. This field\nis optional and is useful if the expression is not a single metric
but\na complex expression which cannot be used in filtering and sorting.\nThe a
lias is also used in the response column header.", | |
171 "type": "string" | |
172 }, | |
173 "formattingType": { | |
174 "description": "Specifies how the metric expression should b
e formatted, for example\n`INTEGER`.", | |
175 "enum": [ | |
176 "METRIC_TYPE_UNSPECIFIED", | |
177 "INTEGER", | |
178 "FLOAT", | |
179 "CURRENCY", | |
180 "PERCENT", | |
181 "TIME" | |
182 ], | |
183 "enumDescriptions": [ | |
184 "Metric type is unspecified.", | |
185 "Integer metric.", | |
186 "Float metric.", | |
187 "Currency metric.", | |
188 "Percentage metric.", | |
189 "Time metric in `HH:MM:SS` format." | |
190 ], | |
191 "type": "string" | |
192 }, | |
193 "expression": { | |
194 "description": "A metric expression in the request. An expre
ssion is constructed from one\nor more metrics and numbers. Accepted operators i
nclude: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by
(*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is
limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases t
he\nmetric expression is just a single metric name like `ga:users`.\nAdding mixe
d `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpec
ted results.", | |
195 "type": "string" | |
196 } | |
197 }, | |
198 "type": "object" | |
199 }, | |
200 "ColumnHeader": { | |
201 "description": "Column headers.", | |
202 "id": "ColumnHeader", | |
203 "properties": { | |
204 "dimensions": { | |
205 "description": "The dimension names in the response.", | |
206 "items": { | |
207 "type": "string" | |
208 }, | |
209 "type": "array" | |
210 }, | |
211 "metricHeader": { | |
212 "$ref": "MetricHeader", | |
213 "description": "Metric headers for the metrics in the respon
se." | |
214 } | |
215 }, | |
216 "type": "object" | |
217 }, | |
218 "DynamicSegment": { | |
219 "description": "Dynamic segment definition for defining the segment
within the request.\nA segment can select users, sessions or both.", | |
220 "id": "DynamicSegment", | |
221 "properties": { | |
222 "sessionSegment": { | |
223 "$ref": "SegmentDefinition", | |
224 "description": "Session Segment to select sessions to includ
e in the segment." | |
225 }, | |
226 "name": { | |
227 "description": "The name of the dynamic segment.", | |
228 "type": "string" | |
229 }, | |
230 "userSegment": { | |
231 "$ref": "SegmentDefinition", | |
232 "description": "User Segment to select users to include in t
he segment." | |
233 } | 156 } |
234 }, | 157 }, |
235 "type": "object" | 158 "type": "object" |
236 }, | 159 }, |
237 "MetricHeader": { | 160 "MetricHeader": { |
238 "description": "The headers for the metrics.", | 161 "description": "The headers for the metrics.", |
239 "id": "MetricHeader", | 162 "id": "MetricHeader", |
240 "properties": { | 163 "properties": { |
| 164 "pivotHeaders": { |
| 165 "description": "Headers for the pivots in the response.", |
| 166 "items": { |
| 167 "$ref": "PivotHeader" |
| 168 }, |
| 169 "type": "array" |
| 170 }, |
241 "metricHeaderEntries": { | 171 "metricHeaderEntries": { |
242 "description": "Headers for the metrics in the response.", | 172 "description": "Headers for the metrics in the response.", |
243 "items": { | 173 "items": { |
244 "$ref": "MetricHeaderEntry" | 174 "$ref": "MetricHeaderEntry" |
245 }, | 175 }, |
246 "type": "array" | 176 "type": "array" |
247 }, | 177 } |
248 "pivotHeaders": { | 178 }, |
249 "description": "Headers for the pivots in the response.", | 179 "type": "object" |
250 "items": { | 180 }, |
251 "$ref": "PivotHeader" | 181 "DimensionFilterClause": { |
252 }, | 182 "description": "A group of dimension filters. Set the operator value
to specify how\nthe filters are logically combined.", |
253 "type": "array" | 183 "id": "DimensionFilterClause", |
254 } | 184 "properties": { |
255 }, | |
256 "type": "object" | |
257 }, | |
258 "Report": { | |
259 "description": "The data response corresponding to the request.", | |
260 "id": "Report", | |
261 "properties": { | |
262 "columnHeader": { | |
263 "$ref": "ColumnHeader", | |
264 "description": "The column headers." | |
265 }, | |
266 "data": { | |
267 "$ref": "ReportData", | |
268 "description": "Response data." | |
269 }, | |
270 "nextPageToken": { | |
271 "description": "Page token to retrieve the next page of resu
lts in the list.", | |
272 "type": "string" | |
273 } | |
274 }, | |
275 "type": "object" | |
276 }, | |
277 "SegmentFilterClause": { | |
278 "description": "Filter Clause to be used in a segment definition, ca
n be wither a metric or\na dimension filter.", | |
279 "id": "SegmentFilterClause", | |
280 "properties": { | |
281 "dimensionFilter": { | |
282 "$ref": "SegmentDimensionFilter", | |
283 "description": "Dimension Filter for the segment definition.
" | |
284 }, | |
285 "metricFilter": { | |
286 "$ref": "SegmentMetricFilter", | |
287 "description": "Metric Filter for the segment definition." | |
288 }, | |
289 "not": { | |
290 "description": "Matches the complement (`!`) of the filter."
, | |
291 "type": "boolean" | |
292 } | |
293 }, | |
294 "type": "object" | |
295 }, | |
296 "DimensionFilter": { | |
297 "description": "Dimension filter specifies the filtering options on
a dimension.", | |
298 "id": "DimensionFilter", | |
299 "properties": { | |
300 "dimensionName": { | |
301 "description": "The dimension to filter on. A DimensionFilte
r must contain a dimension.", | |
302 "type": "string" | |
303 }, | |
304 "operator": { | 185 "operator": { |
305 "description": "How to match the dimension to the expression
. The default is REGEXP.", | 186 "description": "The operator for combining multiple dimensio
n filters. If unspecified, it\nis treated as an `OR`.", |
306 "enum": [ | 187 "enum": [ |
307 "OPERATOR_UNSPECIFIED", | 188 "OPERATOR_UNSPECIFIED", |
308 "REGEXP", | 189 "OR", |
309 "BEGINS_WITH", | 190 "AND" |
310 "ENDS_WITH", | |
311 "PARTIAL", | |
312 "EXACT", | |
313 "NUMERIC_EQUAL", | |
314 "NUMERIC_GREATER_THAN", | |
315 "NUMERIC_LESS_THAN", | |
316 "IN_LIST" | |
317 ], | 191 ], |
318 "enumDescriptions": [ | 192 "enumDescriptions": [ |
319 "If the match type is unspecified, it is treated as a `R
EGEXP`.", | 193 "Unspecified operator. It is treated as an `OR`.", |
320 "The match expression is treated as a regular expression
. All match types\nare not treated as regular expressions.", | 194 "The logical `OR` operator.", |
321 "Matches the value which begin with the match expression
provided.", | 195 "The logical `AND` operator." |
322 "Matches the values which end with the match expression
provided.", | 196 ], |
323 "Substring match.", | 197 "type": "string" |
324 "The value should match the match expression entirely.", | 198 }, |
325 "Integer comparison filters.\ncase sensitivity is ignore
d for these and the expression\nis assumed to be a string representing an intege
r.\nFailure conditions:\n\n- If expression is not a valid int64, the client shou
ld expect\n an error.\n- Input dimensions that are not valid int64 values will
never match the\n filter.", | 199 "filters": { |
326 "Checks if the dimension is numerically greater than the
match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions."
, | 200 "description": "The repeated set of filters. They are logica
lly combined based on the\noperator specified.", |
327 "Checks if the dimension is numerically less than the ma
tch expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", | 201 "items": { |
328 "This option is used to specify a dimension filter whose
expression can\ntake any value from a selected list of values. This helps avoid
ing\nevaluating multiple exact match dimension filters which are OR'ed for\never
y single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\
nAny response row whose dimension has it is value as A, B or C, matches\nthis Di
mensionFilter." | 202 "$ref": "DimensionFilter" |
329 ], | 203 }, |
330 "type": "string" | 204 "type": "array" |
331 }, | 205 } |
332 "caseSensitive": { | 206 }, |
333 "description": "Should the match be case sensitive? Default
is false.", | 207 "type": "object" |
| 208 }, |
| 209 "GetReportsResponse": { |
| 210 "description": "The main response class which holds the reports from
the Reporting API\n`batchGet` call.", |
| 211 "id": "GetReportsResponse", |
| 212 "properties": { |
| 213 "reports": { |
| 214 "description": "Responses corresponding to each of the reque
st.", |
| 215 "items": { |
| 216 "$ref": "Report" |
| 217 }, |
| 218 "type": "array" |
| 219 } |
| 220 }, |
| 221 "type": "object" |
| 222 }, |
| 223 "SequenceSegment": { |
| 224 "description": "Sequence conditions consist of one or more steps, wh
ere each step is defined\nby one or more dimension/metric conditions. Multiple s
teps can be combined\nwith special sequence operators.", |
| 225 "id": "SequenceSegment", |
| 226 "properties": { |
| 227 "segmentSequenceSteps": { |
| 228 "description": "The list of steps in the sequence.", |
| 229 "items": { |
| 230 "$ref": "SegmentSequenceStep" |
| 231 }, |
| 232 "type": "array" |
| 233 }, |
| 234 "firstStepShouldMatchFirstHit": { |
| 235 "description": "If set, first step condition must match the
first hit of the visitor (in\nthe date range).", |
334 "type": "boolean" | 236 "type": "boolean" |
335 }, | 237 } |
336 "expressions": { | 238 }, |
337 "description": "Strings or regular expression to match again
st. Only the first value of\nthe list is used for comparison unless the operator
is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter th
e\ndimensions as explained in the description of the `IN_LIST` operator.", | 239 "type": "object" |
| 240 }, |
| 241 "SegmentMetricFilter": { |
| 242 "description": "Metric filter to be used in a segment filter clause.
", |
| 243 "id": "SegmentMetricFilter", |
| 244 "properties": { |
| 245 "metricName": { |
| 246 "description": "The metric that will be filtered on. A `metr
icFilter` must contain a\nmetric name.", |
| 247 "type": "string" |
| 248 }, |
| 249 "scope": { |
| 250 "description": "Scope for a metric defines the level at whic
h that metric is defined. The\nspecified metric scope must be equal to or great
er than its primary scope\nas defined in the data model. The primary scope is de
fined by if the\nsegment is selecting users or sessions.", |
| 251 "enum": [ |
| 252 "UNSPECIFIED_SCOPE", |
| 253 "PRODUCT", |
| 254 "HIT", |
| 255 "SESSION", |
| 256 "USER" |
| 257 ], |
| 258 "enumDescriptions": [ |
| 259 "If the scope is unspecified, it defaults to the conditi
on scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\n
users or sessions.", |
| 260 "Product scope.", |
| 261 "Hit scope.", |
| 262 "Session scope.", |
| 263 "User scope." |
| 264 ], |
| 265 "type": "string" |
| 266 }, |
| 267 "maxComparisonValue": { |
| 268 "description": "Max comparison value is only used for `BETWE
EN` operator.", |
| 269 "type": "string" |
| 270 }, |
| 271 "comparisonValue": { |
| 272 "description": "The value to compare against. If the operato
r is `BETWEEN`, this value is\ntreated as minimum comparison value.", |
| 273 "type": "string" |
| 274 }, |
| 275 "operator": { |
| 276 "description": "Specifies is the operation to perform to com
pare the metric. The default\nis `EQUAL`.", |
| 277 "enum": [ |
| 278 "UNSPECIFIED_OPERATOR", |
| 279 "LESS_THAN", |
| 280 "GREATER_THAN", |
| 281 "EQUAL", |
| 282 "BETWEEN" |
| 283 ], |
| 284 "enumDescriptions": [ |
| 285 "Unspecified operator is treated as `LESS_THAN` operator
.", |
| 286 "Checks if the metric value is less than comparison valu
e.", |
| 287 "Checks if the metric value is greater than comparison v
alue.", |
| 288 "Equals operator.", |
| 289 "For between operator, both the minimum and maximum are
exclusive.\nWe will use `LT` and `GT` for comparison." |
| 290 ], |
| 291 "type": "string" |
| 292 } |
| 293 }, |
| 294 "type": "object" |
| 295 }, |
| 296 "DateRangeValues": { |
| 297 "description": "Used to return a list of metrics for a single DateRa
nge / dimension\ncombination", |
| 298 "id": "DateRangeValues", |
| 299 "properties": { |
| 300 "values": { |
| 301 "description": "Each value corresponds to each Metric in the
request.", |
338 "items": { | 302 "items": { |
339 "type": "string" | 303 "type": "string" |
340 }, | 304 }, |
341 "type": "array" | 305 "type": "array" |
342 }, | 306 }, |
343 "not": { | 307 "pivotValueRegions": { |
344 "description": "Logical `NOT` operator. If this boolean is s
et to true, then the matching\ndimension values will be excluded in the report.
The default is false.", | 308 "description": "The values of each pivot region.", |
| 309 "items": { |
| 310 "$ref": "PivotValueRegion" |
| 311 }, |
| 312 "type": "array" |
| 313 } |
| 314 }, |
| 315 "type": "object" |
| 316 }, |
| 317 "CohortGroup": { |
| 318 "description": "Defines a cohort group.\nFor example:\n\n \"cohor
tGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"t
ype\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-
01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n
\"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\"
: \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", |
| 319 "id": "CohortGroup", |
| 320 "properties": { |
| 321 "cohorts": { |
| 322 "description": "The definition for the cohort.", |
| 323 "items": { |
| 324 "$ref": "Cohort" |
| 325 }, |
| 326 "type": "array" |
| 327 }, |
| 328 "lifetimeValue": { |
| 329 "description": "Enable Life Time Value (LTV). LTV measures
lifetime value for users\nacquired through different channels.\nPlease see:\n[Co
hort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifeti
me Value](https://support.google.com/analytics/answer/6182550)\nIf the value of
lifetimeValue is false:\n\n- The metric values are similar to the values in the
web interface cohort\n report.\n- The cohort definition date ranges must be ali
gned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek`
the `startDate` in\n the cohort definition should be a Sunday and the `endDate
` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDa
te`\n should be the 1st of the month and `endDate` should be the last day\n of
the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will corre
spond to the values in the web interface\n LifeTime value report.\n- The Lifeti
me Value report shows you how user value (Revenue) and\n engagement (Appviews,
Goal Completions, Sessions, and Session Duration)\n grow during the 90 days aft
er a user is acquired.\n- The metrics are calculated as a cumulative average per
user per the time\n increment.\n- The cohort definition date ranges need not b
e aligned to the calendar\n week and month boundaries.\n- The `viewId` must be
an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersu
sAppViews)", |
345 "type": "boolean" | 330 "type": "boolean" |
346 } | 331 } |
347 }, | 332 }, |
348 "type": "object" | 333 "type": "object" |
349 }, | 334 }, |
350 "SegmentDimensionFilter": { | 335 "GetReportsRequest": { |
351 "description": "Dimension filter specifies the filtering options on
a dimension.", | 336 "description": "The batch request containing multiple report request
.", |
352 "id": "SegmentDimensionFilter", | 337 "id": "GetReportsRequest", |
353 "properties": { | 338 "properties": { |
354 "maxComparisonValue": { | 339 "reportRequests": { |
355 "description": "Maximum comparison values for `BETWEEN` matc
h type.", | 340 "description": "Requests, each request will have a separate
response.\nThere can be a maximum of 5 requests. All requests should have the sa
me\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.", |
356 "type": "string" | 341 "items": { |
357 }, | 342 "$ref": "ReportRequest" |
358 "dimensionName": { | 343 }, |
359 "description": "Name of the dimension for which the filter i
s being applied.", | 344 "type": "array" |
360 "type": "string" | 345 } |
361 }, | 346 }, |
362 "caseSensitive": { | 347 "type": "object" |
363 "description": "Should the match be case sensitive, ignored
for `IN_LIST` operator.", | 348 }, |
364 "type": "boolean" | 349 "Pivot": { |
365 }, | 350 "description": "The Pivot describes the pivot section in the request
.\nThe Pivot helps rearrange the information in the table for certain reports\nb
y pivoting your data on a second dimension.", |
366 "operator": { | 351 "id": "Pivot", |
367 "description": "The operator to use to match the dimension w
ith the expressions.", | 352 "properties": { |
368 "enum": [ | 353 "maxGroupCount": { |
369 "OPERATOR_UNSPECIFIED", | 354 "description": "Specifies the maximum number of groups to re
turn.\nThe default value is 10, also the maximum value is 1,000.", |
370 "REGEXP", | |
371 "BEGINS_WITH", | |
372 "ENDS_WITH", | |
373 "PARTIAL", | |
374 "EXACT", | |
375 "IN_LIST", | |
376 "NUMERIC_LESS_THAN", | |
377 "NUMERIC_GREATER_THAN", | |
378 "NUMERIC_BETWEEN" | |
379 ], | |
380 "enumDescriptions": [ | |
381 "If the match type is unspecified, it is treated as a RE
GEXP.", | |
382 "The match expression is treated as a regular expression
. All other match\ntypes are not treated as regular expressions.", | |
383 "Matches the values which begin with the match expressio
n provided.", | |
384 "Matches the values which end with the match expression
provided.", | |
385 "Substring match.", | |
386 "The value should match the match expression entirely.", | |
387 "This option is used to specify a dimension filter whose
expression can\ntake any value from a selected list of values. This helps avoid
ing\nevaluating multiple exact match dimension filters which are OR'ed for\never
y single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\
nAny response row whose dimension has it is value as A, B or C, matches\nthis Di
mensionFilter.", | |
388 "Integer comparison filters.\ncase sensitivity is ignore
d for these and the expression\nis assumed to be a string representing an intege
r.\nFailure conditions:\n\n- if expression is not a valid int64, the client shou
ld expect\n an error.\n- input dimensions that are not valid int64 values will
never match the\n filter.\n\nChecks if the dimension is numerically less than t
he match expression.", | |
389 "Checks if the dimension is numerically greater than the
match\nexpression.", | |
390 "Checks if the dimension is numerically between the mini
mum and maximum\nof the match expression, boundaries excluded." | |
391 ], | |
392 "type": "string" | |
393 }, | |
394 "expressions": { | |
395 "description": "The list of expressions, only the first elem
ent is used for all operators", | |
396 "items": { | |
397 "type": "string" | |
398 }, | |
399 "type": "array" | |
400 }, | |
401 "minComparisonValue": { | |
402 "description": "Minimum comparison values for `BETWEEN` matc
h type.", | |
403 "type": "string" | |
404 } | |
405 }, | |
406 "type": "object" | |
407 }, | |
408 "ReportRequest": { | |
409 "description": "The main request class which specifies the Reporting
API request.", | |
410 "id": "ReportRequest", | |
411 "properties": { | |
412 "cohortGroup": { | |
413 "$ref": "CohortGroup", | |
414 "description": "Cohort group associated with this request. I
f there is a cohort group\nin the request the `ga:cohort` dimension must be pres
ent.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncon
tain the same `cohortGroup` definition." | |
415 }, | |
416 "dimensions": { | |
417 "description": "The dimensions requested.\nRequests can have
a total of 7 dimensions.", | |
418 "items": { | |
419 "$ref": "Dimension" | |
420 }, | |
421 "type": "array" | |
422 }, | |
423 "metricFilterClauses": { | |
424 "description": "The metric filter clauses. They are logicall
y combined with the `AND`\noperator. Metric filters look at only the first date
range and not the\ncomparing date range. Note that filtering on metrics occurs
after the\nmetrics are aggregated.", | |
425 "items": { | |
426 "$ref": "MetricFilterClause" | |
427 }, | |
428 "type": "array" | |
429 }, | |
430 "hideTotals": { | |
431 "description": "If set to true, hides the total of all metri
cs for all the matching rows,\nfor every date range. The default false and will
return the totals.", | |
432 "type": "boolean" | |
433 }, | |
434 "includeEmptyRows": { | |
435 "description": "If set to false, the response does not inclu
de rows if all the retrieved\nmetrics are equal to zero. The default is false wh
ich will exclude these\nrows.", | |
436 "type": "boolean" | |
437 }, | |
438 "dimensionFilterClauses": { | |
439 "description": "The dimension filter clauses for filtering D
imension Values. They are\nlogically combined with the `AND` operator. Note that
filtering occurs\nbefore any dimensions are aggregated, so that the returned me
trics\nrepresent the total for only the relevant dimensions.", | |
440 "items": { | |
441 "$ref": "DimensionFilterClause" | |
442 }, | |
443 "type": "array" | |
444 }, | |
445 "pivots": { | |
446 "description": "The pivot definitions. Requests can have a m
aximum of 2 pivots.", | |
447 "items": { | |
448 "$ref": "Pivot" | |
449 }, | |
450 "type": "array" | |
451 }, | |
452 "dateRanges": { | |
453 "description": "Date ranges in the request. The request can
have a maximum of 2 date\nranges. The response will contain a set of metric valu
es for each\ncombination of the dimensions for each date range in the request. S
o, if\nthere are two date ranges, there will be two set of metric values, one fo
r\nthe original date range and one for the second date range.\nThe `reportReques
t.dateRanges` field should not be specified for cohorts\nor Lifetime value reque
sts.\nIf a date range is not provided, the default date range is (startDate:\ncu
rrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#Rep
ortRequest) within a `batchGet` method must\ncontain the same `dateRanges` defin
ition.", | |
454 "items": { | |
455 "$ref": "DateRange" | |
456 }, | |
457 "type": "array" | |
458 }, | |
459 "segments": { | |
460 "description": "Segment the data returned for the request. A
segment definition helps look\nat a subset of the segment request. A request ca
n contain up to four\nsegments. Every [ReportRequest](#ReportRequest) within a\n
`batchGet` method must contain the same `segments` definition. Requests\nwith se
gments must have the `ga:segment` dimension.", | |
461 "items": { | |
462 "$ref": "Segment" | |
463 }, | |
464 "type": "array" | |
465 }, | |
466 "samplingLevel": { | |
467 "description": "The desired report\n[sample](https://support
.google.com/analytics/answer/2637192) size.\nIf the the `samplingLevel` field is
unspecified the `DEFAULT` sampling\nlevel is used. Every [ReportRequest](#Repor
tRequest) within a\n`batchGet` method must contain the same `samplingLevel` defi
nition. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sam
pling)\n for details.", | |
468 "enum": [ | |
469 "SAMPLING_UNSPECIFIED", | |
470 "DEFAULT", | |
471 "SMALL", | |
472 "LARGE" | |
473 ], | |
474 "enumDescriptions": [ | |
475 "If the `samplingLevel` field is unspecified the `DEFAUL
T` sampling level\nis used.", | |
476 "Returns response with a sample size that balances speed
and\naccuracy.", | |
477 "It returns a fast response with a smaller sampling size
.", | |
478 "Returns a more accurate response using a large sampling
size. But this\nmay result in response being slower." | |
479 ], | |
480 "type": "string" | |
481 }, | |
482 "metrics": { | |
483 "description": "The metrics requested.\nRequests must specif
y at least one metric. Requests can have a\ntotal of 10 metrics.", | |
484 "items": { | |
485 "$ref": "Metric" | |
486 }, | |
487 "type": "array" | |
488 }, | |
489 "pageSize": { | |
490 "description": "Page size is for paging and specifies the ma
ximum number of returned rows.\nPage size should be >= 0. A query returns the de
fault of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,0
00 rows per\nrequest, no matter how many you ask for. It can also return fewer r
ows\nthan requested, if there aren't as many dimension segments as you expect.\n
For instance, there are fewer than 300 possible values for `ga:country`,\nso whe
n segmenting only by country, you can't get more than 300 rows,\neven if you set
`pageSize` to a higher value.", | |
491 "format": "int32", | 355 "format": "int32", |
492 "type": "integer" | 356 "type": "integer" |
493 }, | 357 }, |
494 "orderBys": { | 358 "startGroup": { |
495 "description": "Sort order on output rows. To compare two ro
ws, the elements of the\nfollowing are applied in order until a difference is fo
und. All date\nranges in the output get the same row order.", | 359 "description": "If k metrics were requested, then the respon
se will contain some\ndata-dependent multiple of k columns in the report. E.g.,
if you pivoted\non the dimension `ga:browser` then you'd get k columns for \"Fi
refox\", k\ncolumns for \"IE\", k columns for \"Chrome\", etc. The ordering of t
he groups\nof columns is determined by descending order of \"total\" for the fir
st of\nthe k values. Ties are broken by lexicographic ordering of the first\npi
vot dimension, then lexicographic ordering of the second pivot\ndimension, and s
o on. E.g., if the totals for the first value for\nFirefox, IE, and Chrome were
8, 2, 8, respectively, the order of columns\nwould be Chrome, Firefox, IE.\n\nT
he following let you choose which of the groups of k columns are\nincluded in th
e response.", |
496 "items": { | 360 "format": "int32", |
497 "$ref": "OrderBy" | 361 "type": "integer" |
498 }, | 362 }, |
499 "type": "array" | 363 "metrics": { |
500 }, | 364 "description": "The pivot metrics. Pivot metrics are part of
the\nrestriction on total number of metrics allowed in the request.", |
501 "filtersExpression": { | 365 "items": { |
502 "description": "Dimension or metric filters that restrict th
e data returned for your\nrequest. To use the `filtersExpression`, supply a dime
nsion or metric on\nwhich to filter, followed by the filter expression. For exam
ple, the\nfollowing expression selects `ga:browser` dimension which starts with\
nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric
filters, see\n[Filters reference](https://developers.google.com/analytics/devgu
ides/reporting/core/v3/reference#filters).", | 366 "$ref": "Metric" |
503 "type": "string" | 367 }, |
504 }, | 368 "type": "array" |
505 "hideValueRanges": { | 369 }, |
506 "description": "If set to true, hides the minimum and maximu
m across all matching rows.\nThe default is false and the value ranges are retur
ned.", | 370 "dimensions": { |
| 371 "description": "A list of dimensions to show as pivot column
s. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the
restriction on the\ntotal number of dimensions allowed in the request.", |
| 372 "items": { |
| 373 "$ref": "Dimension" |
| 374 }, |
| 375 "type": "array" |
| 376 }, |
| 377 "dimensionFilterClauses": { |
| 378 "description": "DimensionFilterClauses are logically combine
d with an `AND` operator: only\ndata that is included by all these DimensionFilt
erClauses contributes to\nthe values in this pivot region. Dimension filters can
be used to restrict\nthe columns shown in the pivot region. For example if you
have\n`ga:browser` as the requested dimension in the pivot region, and you\nspec
ify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen on
ly those two browsers would show up as columns.", |
| 379 "items": { |
| 380 "$ref": "DimensionFilterClause" |
| 381 }, |
| 382 "type": "array" |
| 383 } |
| 384 }, |
| 385 "type": "object" |
| 386 }, |
| 387 "PivotHeaderEntry": { |
| 388 "description": "The headers for the each of the metric column corres
ponding to the metrics\nrequested in the pivots section of the response.", |
| 389 "id": "PivotHeaderEntry", |
| 390 "properties": { |
| 391 "dimensionNames": { |
| 392 "description": "The name of the dimensions in the pivot resp
onse.", |
| 393 "items": { |
| 394 "type": "string" |
| 395 }, |
| 396 "type": "array" |
| 397 }, |
| 398 "metric": { |
| 399 "$ref": "MetricHeaderEntry", |
| 400 "description": "The metric header for the metric in the pivo
t." |
| 401 }, |
| 402 "dimensionValues": { |
| 403 "description": "The values for the dimensions in the pivot."
, |
| 404 "items": { |
| 405 "type": "string" |
| 406 }, |
| 407 "type": "array" |
| 408 } |
| 409 }, |
| 410 "type": "object" |
| 411 }, |
| 412 "SegmentFilter": { |
| 413 "description": "SegmentFilter defines the segment to be either a sim
ple or a sequence\nsegment. A simple segment condition contains dimension and me
tric conditions\nto select the sessions or users. A sequence segment condition c
an be used to\nselect users or sessions based on sequential conditions.", |
| 414 "id": "SegmentFilter", |
| 415 "properties": { |
| 416 "sequenceSegment": { |
| 417 "$ref": "SequenceSegment", |
| 418 "description": "Sequence conditions consist of one or more s
teps, where each step is\ndefined by one or more dimension/metric conditions. Mu
ltiple steps can\nbe combined with special sequence operators." |
| 419 }, |
| 420 "not": { |
| 421 "description": "If true, match the complement of simple or s
equence segment.\nFor example, to match all visits not from \"New York\", we can
define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segme
ntFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegme
nt\": [{\n \"segmentFilterClauses\":[{\n \"dimension
Filter\": {\n \"dimensionName\": \"ga:city\",\n
\"expressions\": [\"New York\"]\n }\n }]\n
}]\n },\n \"not\": \"True\"\n }]\n },", |
507 "type": "boolean" | 422 "type": "boolean" |
508 }, | 423 }, |
509 "viewId": { | 424 "simpleSegment": { |
510 "description": "The Analytics\n[view ID](https://support.goo
gle.com/analytics/answer/1009618)\nfrom which to retrieve data. Every [ReportReq
uest](#ReportRequest)\nwithin a `batchGet` method must contain the same `viewId`
.", | 425 "$ref": "SimpleSegment", |
511 "type": "string" | 426 "description": "A Simple segment conditions consist of one o
r more dimension/metric\nconditions that can be combined" |
512 }, | 427 } |
513 "pageToken": { | 428 }, |
514 "description": "A continuation token to get the next page of
the results. Adding this to\nthe request will return the rows after the pageTok
en. The pageToken should\nbe the value returned in the nextPageToken parameter i
n the response to\nthe GetReports request.", | 429 "type": "object" |
515 "type": "string" | |
516 } | |
517 }, | |
518 "type": "object" | |
519 }, | |
520 "SimpleSegment": { | |
521 "description": "A Simple segment conditions consist of one or more d
imension/metric\nconditions that can be combined.", | |
522 "id": "SimpleSegment", | |
523 "properties": { | |
524 "orFiltersForSegment": { | |
525 "description": "A list of segment filters groups which are c
ombined with logical `AND`\noperator.", | |
526 "items": { | |
527 "$ref": "OrFiltersForSegment" | |
528 }, | |
529 "type": "array" | |
530 } | |
531 }, | |
532 "type": "object" | |
533 }, | 430 }, |
534 "SegmentDefinition": { | 431 "SegmentDefinition": { |
535 "description": "SegmentDefinition defines the segment to be a set of
SegmentFilters which\nare combined together with a logical `AND` operation.", | 432 "description": "SegmentDefinition defines the segment to be a set of
SegmentFilters which\nare combined together with a logical `AND` operation.", |
536 "id": "SegmentDefinition", | 433 "id": "SegmentDefinition", |
537 "properties": { | 434 "properties": { |
538 "segmentFilters": { | 435 "segmentFilters": { |
539 "description": "A segment is defined by a set of segment fil
ters which are combined\ntogether with a logical `AND` operation.", | 436 "description": "A segment is defined by a set of segment fil
ters which are combined\ntogether with a logical `AND` operation.", |
540 "items": { | 437 "items": { |
541 "$ref": "SegmentFilter" | 438 "$ref": "SegmentFilter" |
542 }, | 439 }, |
543 "type": "array" | 440 "type": "array" |
544 } | 441 } |
545 }, | 442 }, |
546 "type": "object" | 443 "type": "object" |
547 }, | 444 }, |
548 "SegmentMetricFilter": { | 445 "MetricHeaderEntry": { |
549 "description": "Metric filter to be used in a segment filter clause.
", | 446 "description": "Header for the metrics.", |
550 "id": "SegmentMetricFilter", | 447 "id": "MetricHeaderEntry", |
551 "properties": { | 448 "properties": { |
552 "metricName": { | 449 "name": { |
553 "description": "The metric that will be filtered on. A `metr
icFilter` must contain a\nmetric name.", | 450 "description": "The name of the header.", |
554 "type": "string" | 451 "type": "string" |
555 }, | 452 }, |
556 "operator": { | 453 "type": { |
557 "description": "Specifies is the operation to perform to com
pare the metric. The default\nis `EQUAL`.", | 454 "description": "The type of the metric, for example `INTEGER
`.", |
558 "enum": [ | 455 "enum": [ |
559 "UNSPECIFIED_OPERATOR", | 456 "METRIC_TYPE_UNSPECIFIED", |
560 "LESS_THAN", | 457 "INTEGER", |
561 "GREATER_THAN", | 458 "FLOAT", |
562 "EQUAL", | 459 "CURRENCY", |
563 "BETWEEN" | 460 "PERCENT", |
| 461 "TIME" |
564 ], | 462 ], |
565 "enumDescriptions": [ | 463 "enumDescriptions": [ |
566 "Unspecified operator is treated as `LESS_THAN` operator
.", | 464 "Metric type is unspecified.", |
567 "Checks if the metric value is less than comparison valu
e.", | 465 "Integer metric.", |
568 "Checks if the metric value is greater than comparison v
alue.", | 466 "Float metric.", |
569 "Equals operator.", | 467 "Currency metric.", |
570 "For between operator, both the minimum and maximum are
exclusive.\nWe will use `LT` and `GT` for comparison." | 468 "Percentage metric.", |
| 469 "Time metric in `HH:MM:SS` format." |
571 ], | 470 ], |
572 "type": "string" | 471 "type": "string" |
573 }, | |
574 "comparisonValue": { | |
575 "description": "The value to compare against. If the operato
r is `BETWEEN`, this value is\ntreated as minimum comparison value.", | |
576 "type": "string" | |
577 }, | |
578 "scope": { | |
579 "description": "Scope for a metric defines the level at whic
h that metric is defined. The\nspecified metric scope must be equal to or great
er than its primary scope\nas defined in the data model. The primary scope is de
fined by if the\nsegment is selecting users or sessions.", | |
580 "enum": [ | |
581 "UNSPECIFIED_SCOPE", | |
582 "PRODUCT", | |
583 "HIT", | |
584 "SESSION", | |
585 "USER" | |
586 ], | |
587 "enumDescriptions": [ | |
588 "If the scope is unspecified, it defaults to the conditi
on scope,\n`USER` or `SESSION` depending on if the segment is trying to choose\n
users or sessions.", | |
589 "Product scope.", | |
590 "Hit scope.", | |
591 "Session scope.", | |
592 "User scope." | |
593 ], | |
594 "type": "string" | |
595 }, | |
596 "maxComparisonValue": { | |
597 "description": "Max comparison value is only used for `BETWE
EN` operator.", | |
598 "type": "string" | |
599 } | 472 } |
600 }, | 473 }, |
601 "type": "object" | 474 "type": "object" |
602 }, | 475 }, |
603 "ReportData": { | 476 "ReportData": { |
604 "description": "The data part of the report.", | 477 "description": "The data part of the report.", |
605 "id": "ReportData", | 478 "id": "ReportData", |
606 "properties": { | 479 "properties": { |
607 "rowCount": { | |
608 "description": "Total number of matching rows for this query
.", | |
609 "format": "int32", | |
610 "type": "integer" | |
611 }, | |
612 "samplingSpaceSizes": { | 480 "samplingSpaceSizes": { |
613 "description": "If the results are\n[sampled](https://suppor
t.google.com/analytics/answer/2637192),\nthis returns the total number of\nsampl
es present, one entry per date range. If the results are not sampled\nthis field
will not be defined. See\n[developer guide](/analytics/devguides/reporting/core
/v4/basics#sampling)\nfor details.", | 481 "description": "If the results are\n[sampled](https://suppor
t.google.com/analytics/answer/2637192),\nthis returns the total number of\nsampl
es present, one entry per date range. If the results are not sampled\nthis field
will not be defined. See\n[developer guide](/analytics/devguides/reporting/core
/v4/basics#sampling)\nfor details.", |
614 "items": { | 482 "items": { |
615 "format": "int64", | 483 "format": "int64", |
616 "type": "string" | 484 "type": "string" |
617 }, | 485 }, |
618 "type": "array" | 486 "type": "array" |
619 }, | 487 }, |
620 "maximums": { | 488 "minimums": { |
621 "description": "Minimum and maximum values seen over all mat
ching rows. These are both\nempty when `hideValueRanges` in the request is false
, or when\nrowCount is zero.", | 489 "description": "Minimum and maximum values seen over all mat
ching rows. These are both\nempty when `hideValueRanges` in the request is false
, or when\nrowCount is zero.", |
622 "items": { | 490 "items": { |
623 "$ref": "DateRangeValues" | 491 "$ref": "DateRangeValues" |
624 }, | 492 }, |
625 "type": "array" | 493 "type": "array" |
626 }, | 494 }, |
| 495 "totals": { |
| 496 "description": "For each requested date range, for the set o
f all rows that match\nthe query, every requested value format gets a total. The
total\nfor a value format is computed by first totaling the metrics\nmentioned
in the value format and then evaluating the value\nformat as a scalar expression
. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of a
ll relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", |
| 497 "items": { |
| 498 "$ref": "DateRangeValues" |
| 499 }, |
| 500 "type": "array" |
| 501 }, |
627 "samplesReadCounts": { | 502 "samplesReadCounts": { |
628 "description": "If the results are\n[sampled](https://suppor
t.google.com/analytics/answer/2637192),\nthis returns the total number of sample
s read, one entry per date range.\nIf the results are not sampled this field wil
l not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/
basics#sampling)\nfor details.", | 503 "description": "If the results are\n[sampled](https://suppor
t.google.com/analytics/answer/2637192),\nthis returns the total number of sample
s read, one entry per date range.\nIf the results are not sampled this field wil
l not be defined. See\n[developer guide](/analytics/devguides/reporting/core/v4/
basics#sampling)\nfor details.", |
629 "items": { | 504 "items": { |
630 "format": "int64", | 505 "format": "int64", |
631 "type": "string" | 506 "type": "string" |
632 }, | 507 }, |
633 "type": "array" | 508 "type": "array" |
634 }, | 509 }, |
635 "minimums": { | 510 "rowCount": { |
636 "description": "Minimum and maximum values seen over all mat
ching rows. These are both\nempty when `hideValueRanges` in the request is false
, or when\nrowCount is zero.", | 511 "description": "Total number of matching rows for this query
.", |
637 "items": { | 512 "format": "int32", |
638 "$ref": "DateRangeValues" | 513 "type": "integer" |
639 }, | |
640 "type": "array" | |
641 }, | 514 }, |
642 "rows": { | 515 "rows": { |
643 "description": "There's one ReportRow for every unique combi
nation of dimensions.", | 516 "description": "There's one ReportRow for every unique combi
nation of dimensions.", |
644 "items": { | 517 "items": { |
645 "$ref": "ReportRow" | 518 "$ref": "ReportRow" |
646 }, | 519 }, |
647 "type": "array" | 520 "type": "array" |
648 }, | 521 }, |
| 522 "isDataGolden": { |
| 523 "description": "Indicates if response to this request is gol
den or not. Data is\ngolden when the exact same request will not produce any new
results if\nasked at a later point in time.", |
| 524 "type": "boolean" |
| 525 }, |
649 "dataLastRefreshed": { | 526 "dataLastRefreshed": { |
650 "description": "The last time the data in the report was ref
reshed. All the hits received\nbefore this timestamp are included in the calcula
tion of the report.", | 527 "description": "The last time the data in the report was ref
reshed. All the hits received\nbefore this timestamp are included in the calcula
tion of the report.", |
651 "format": "google-datetime", | 528 "format": "google-datetime", |
652 "type": "string" | 529 "type": "string" |
653 }, | 530 }, |
654 "totals": { | 531 "maximums": { |
655 "description": "For each requested date range, for the set o
f all rows that match\nthe query, every requested value format gets a total. The
total\nfor a value format is computed by first totaling the metrics\nmentioned
in the value format and then evaluating the value\nformat as a scalar expression
. E.g., The \"totals\" for\n`3 / (ga:sessions + 2)` we compute\n`3 / ((sum of a
ll relevant ga:sessions) + 2)`.\nTotals are computed before pagination.", | 532 "description": "Minimum and maximum values seen over all mat
ching rows. These are both\nempty when `hideValueRanges` in the request is false
, or when\nrowCount is zero.", |
656 "items": { | 533 "items": { |
657 "$ref": "DateRangeValues" | 534 "$ref": "DateRangeValues" |
658 }, | 535 }, |
659 "type": "array" | 536 "type": "array" |
660 }, | |
661 "isDataGolden": { | |
662 "description": "Indicates if response to this request is gol
den or not. Data is\ngolden when the exact same request will not produce any new
results if\nasked at a later point in time.", | |
663 "type": "boolean" | |
664 } | |
665 }, | |
666 "type": "object" | |
667 }, | |
668 "GetReportsRequest": { | |
669 "description": "The batch request containing multiple report request
.", | |
670 "id": "GetReportsRequest", | |
671 "properties": { | |
672 "reportRequests": { | |
673 "description": "Requests, each request will have a separate
response.\nThere can be a maximum of 5 requests. All requests should have the sa
me\n`dateRanges`, `viewId`, `segments`, `samplingLevel`, and `cohortGroup`.", | |
674 "items": { | |
675 "$ref": "ReportRequest" | |
676 }, | |
677 "type": "array" | |
678 } | 537 } |
679 }, | 538 }, |
680 "type": "object" | 539 "type": "object" |
| 540 }, |
| 541 "DimensionFilter": { |
| 542 "description": "Dimension filter specifies the filtering options on
a dimension.", |
| 543 "id": "DimensionFilter", |
| 544 "properties": { |
| 545 "not": { |
| 546 "description": "Logical `NOT` operator. If this boolean is s
et to true, then the matching\ndimension values will be excluded in the report.
The default is false.", |
| 547 "type": "boolean" |
| 548 }, |
| 549 "expressions": { |
| 550 "description": "Strings or regular expression to match again
st. Only the first value of\nthe list is used for comparison unless the operator
is `IN_LIST`.\nIf `IN_LIST` operator, then the entire list is used to filter th
e\ndimensions as explained in the description of the `IN_LIST` operator.", |
| 551 "items": { |
| 552 "type": "string" |
| 553 }, |
| 554 "type": "array" |
| 555 }, |
| 556 "caseSensitive": { |
| 557 "description": "Should the match be case sensitive? Default
is false.", |
| 558 "type": "boolean" |
| 559 }, |
| 560 "dimensionName": { |
| 561 "description": "The dimension to filter on. A DimensionFilte
r must contain a dimension.", |
| 562 "type": "string" |
| 563 }, |
| 564 "operator": { |
| 565 "description": "How to match the dimension to the expression
. The default is REGEXP.", |
| 566 "enum": [ |
| 567 "OPERATOR_UNSPECIFIED", |
| 568 "REGEXP", |
| 569 "BEGINS_WITH", |
| 570 "ENDS_WITH", |
| 571 "PARTIAL", |
| 572 "EXACT", |
| 573 "NUMERIC_EQUAL", |
| 574 "NUMERIC_GREATER_THAN", |
| 575 "NUMERIC_LESS_THAN", |
| 576 "IN_LIST" |
| 577 ], |
| 578 "enumDescriptions": [ |
| 579 "If the match type is unspecified, it is treated as a `R
EGEXP`.", |
| 580 "The match expression is treated as a regular expression
. All match types\nare not treated as regular expressions.", |
| 581 "Matches the value which begin with the match expression
provided.", |
| 582 "Matches the values which end with the match expression
provided.", |
| 583 "Substring match.", |
| 584 "The value should match the match expression entirely.", |
| 585 "Integer comparison filters.\ncase sensitivity is ignore
d for these and the expression\nis assumed to be a string representing an intege
r.\nFailure conditions:\n\n- If expression is not a valid int64, the client shou
ld expect\n an error.\n- Input dimensions that are not valid int64 values will
never match the\n filter.", |
| 586 "Checks if the dimension is numerically greater than the
match\nexpression. Read the description for `NUMERIC_EQUALS` for restrictions."
, |
| 587 "Checks if the dimension is numerically less than the ma
tch expression.\nRead the description for `NUMERIC_EQUALS` for restrictions.", |
| 588 "This option is used to specify a dimension filter whose
expression can\ntake any value from a selected list of values. This helps avoid
ing\nevaluating multiple exact match dimension filters which are OR'ed for\never
y single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\
nAny response row whose dimension has it is value as A, B or C, matches\nthis Di
mensionFilter." |
| 589 ], |
| 590 "type": "string" |
| 591 } |
| 592 }, |
| 593 "type": "object" |
| 594 }, |
| 595 "SegmentDimensionFilter": { |
| 596 "description": "Dimension filter specifies the filtering options on
a dimension.", |
| 597 "id": "SegmentDimensionFilter", |
| 598 "properties": { |
| 599 "minComparisonValue": { |
| 600 "description": "Minimum comparison values for `BETWEEN` matc
h type.", |
| 601 "type": "string" |
| 602 }, |
| 603 "maxComparisonValue": { |
| 604 "description": "Maximum comparison values for `BETWEEN` matc
h type.", |
| 605 "type": "string" |
| 606 }, |
| 607 "dimensionName": { |
| 608 "description": "Name of the dimension for which the filter i
s being applied.", |
| 609 "type": "string" |
| 610 }, |
| 611 "operator": { |
| 612 "description": "The operator to use to match the dimension w
ith the expressions.", |
| 613 "enum": [ |
| 614 "OPERATOR_UNSPECIFIED", |
| 615 "REGEXP", |
| 616 "BEGINS_WITH", |
| 617 "ENDS_WITH", |
| 618 "PARTIAL", |
| 619 "EXACT", |
| 620 "IN_LIST", |
| 621 "NUMERIC_LESS_THAN", |
| 622 "NUMERIC_GREATER_THAN", |
| 623 "NUMERIC_BETWEEN" |
| 624 ], |
| 625 "enumDescriptions": [ |
| 626 "If the match type is unspecified, it is treated as a RE
GEXP.", |
| 627 "The match expression is treated as a regular expression
. All other match\ntypes are not treated as regular expressions.", |
| 628 "Matches the values which begin with the match expressio
n provided.", |
| 629 "Matches the values which end with the match expression
provided.", |
| 630 "Substring match.", |
| 631 "The value should match the match expression entirely.", |
| 632 "This option is used to specify a dimension filter whose
expression can\ntake any value from a selected list of values. This helps avoid
ing\nevaluating multiple exact match dimension filters which are OR'ed for\never
y single response row. For example:\n\n expressions: [\"A\", \"B\", \"C\"]\n\
nAny response row whose dimension has it is value as A, B or C, matches\nthis Di
mensionFilter.", |
| 633 "Integer comparison filters.\ncase sensitivity is ignore
d for these and the expression\nis assumed to be a string representing an intege
r.\nFailure conditions:\n\n- if expression is not a valid int64, the client shou
ld expect\n an error.\n- input dimensions that are not valid int64 values will
never match the\n filter.\n\nChecks if the dimension is numerically less than t
he match expression.", |
| 634 "Checks if the dimension is numerically greater than the
match\nexpression.", |
| 635 "Checks if the dimension is numerically between the mini
mum and maximum\nof the match expression, boundaries excluded." |
| 636 ], |
| 637 "type": "string" |
| 638 }, |
| 639 "expressions": { |
| 640 "description": "The list of expressions, only the first elem
ent is used for all operators", |
| 641 "items": { |
| 642 "type": "string" |
| 643 }, |
| 644 "type": "array" |
| 645 }, |
| 646 "caseSensitive": { |
| 647 "description": "Should the match be case sensitive, ignored
for `IN_LIST` operator.", |
| 648 "type": "boolean" |
| 649 } |
| 650 }, |
| 651 "type": "object" |
681 }, | 652 }, |
682 "OrderBy": { | 653 "OrderBy": { |
683 "description": "Specifies the sorting options.", | 654 "description": "Specifies the sorting options.", |
684 "id": "OrderBy", | 655 "id": "OrderBy", |
685 "properties": { | 656 "properties": { |
686 "sortOrder": { | 657 "fieldName": { |
687 "description": "The sorting order for the field.", | 658 "description": "The field which to sort by. The default sort
order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify on
e field for sort here. For example,\n`ga:browser, ga:city` is not valid.", |
688 "enum": [ | |
689 "SORT_ORDER_UNSPECIFIED", | |
690 "ASCENDING", | |
691 "DESCENDING" | |
692 ], | |
693 "enumDescriptions": [ | |
694 "If the sort order is unspecified, the default is ascend
ing.", | |
695 "Ascending sort. The field will be sorted in an ascendin
g manner.", | |
696 "Descending sort. The field will be sorted in a descendi
ng manner." | |
697 ], | |
698 "type": "string" | 659 "type": "string" |
699 }, | 660 }, |
700 "orderType": { | 661 "orderType": { |
701 "description": "The order type. The default orderType is `VA
LUE`.", | 662 "description": "The order type. The default orderType is `VA
LUE`.", |
702 "enum": [ | 663 "enum": [ |
703 "ORDER_TYPE_UNSPECIFIED", | 664 "ORDER_TYPE_UNSPECIFIED", |
704 "VALUE", | 665 "VALUE", |
705 "DELTA", | 666 "DELTA", |
706 "SMART", | 667 "SMART", |
707 "HISTOGRAM_BUCKET", | 668 "HISTOGRAM_BUCKET", |
708 "DIMENSION_AS_INTEGER" | 669 "DIMENSION_AS_INTEGER" |
709 ], | 670 ], |
710 "enumDescriptions": [ | 671 "enumDescriptions": [ |
711 "Unspecified order type will be treated as sort based on
value.", | 672 "Unspecified order type will be treated as sort based on
value.", |
712 "The sort order is based on the value of the chosen colu
mn; looks only at\nthe first date range.", | 673 "The sort order is based on the value of the chosen colu
mn; looks only at\nthe first date range.", |
713 "The sort order is based on the difference of the values
of the chosen\ncolumn between the first two date ranges. Usable only if there
are\nexactly two date ranges.", | 674 "The sort order is based on the difference of the values
of the chosen\ncolumn between the first two date ranges. Usable only if there
are\nexactly two date ranges.", |
714 "The sort order is based on weighted value of the chosen
column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe
`(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios."
, | 675 "The sort order is based on weighted value of the chosen
column. If\ncolumn has n/d format, then weighted value of this ratio will\nbe
`(n + totals.n)/(d + totals.d)` Usable only for metrics that\nrepresent ratios."
, |
715 "Histogram order type is applicable only to dimension co
lumns with\nnon-empty histogram-buckets.", | 676 "Histogram order type is applicable only to dimension co
lumns with\nnon-empty histogram-buckets.", |
716 "If the dimensions are fixed length numbers, ordinary so
rt would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions a
re\nvariable length numbers." | 677 "If the dimensions are fixed length numbers, ordinary so
rt would just\nwork fine. `DIMENSION_AS_INTEGER` can be used if the dimensions a
re\nvariable length numbers." |
717 ], | 678 ], |
718 "type": "string" | 679 "type": "string" |
719 }, | 680 }, |
720 "fieldName": { | 681 "sortOrder": { |
721 "description": "The field which to sort by. The default sort
order is ascending. Example:\n`ga:browser`.\nNote, that you can only specify on
e field for sort here. For example,\n`ga:browser, ga:city` is not valid.", | 682 "description": "The sorting order for the field.", |
722 "type": "string" | 683 "enum": [ |
723 } | 684 "SORT_ORDER_UNSPECIFIED", |
724 }, | 685 "ASCENDING", |
725 "type": "object" | 686 "DESCENDING" |
726 }, | 687 ], |
727 "Cohort": { | 688 "enumDescriptions": [ |
728 "description": "Defines a cohort. A cohort is a group of users who s
hare a common\ncharacteristic. For example, all users with the same acquisition
date\nbelong to the same cohort.", | 689 "If the sort order is unspecified, the default is ascend
ing.", |
729 "id": "Cohort", | 690 "Ascending sort. The field will be sorted in an ascendin
g manner.", |
730 "properties": { | 691 "Descending sort. The field will be sorted in a descendi
ng manner." |
731 "type": { | 692 ], |
732 "description": "Type of the cohort. The only supported type
as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is tre
ated\nas `FIRST_VISIT_DATE` type cohort.", | 693 "type": "string" |
733 "enum": [ | 694 } |
734 "UNSPECIFIED_COHORT_TYPE", | 695 }, |
735 "FIRST_VISIT_DATE" | 696 "type": "object" |
736 ], | 697 }, |
737 "enumDescriptions": [ | 698 "Segment": { |
738 "If unspecified it's treated as `FIRST_VISIT_DATE`.", | 699 "description": "The segment definition, if the report needs to be se
gmented.\nA Segment is a subset of the Analytics data. For example, of the entir
e\nset of users, one Segment might be users from a particular country or city.", |
739 "Cohorts that are selected based on first visit date." | 700 "id": "Segment", |
740 ], | 701 "properties": { |
741 "type": "string" | 702 "dynamicSegment": { |
742 }, | 703 "$ref": "DynamicSegment", |
743 "dateRange": { | 704 "description": "A dynamic segment definition in the request.
" |
744 "$ref": "DateRange", | 705 }, |
745 "description": "This is used for `FIRST_VISIT_DATE` cohort,
the cohort selects users\nwhose first visit date is between start date and end d
ate defined in the\nDateRange. The date ranges should be aligned for cohort requ
ests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day lo
ng,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\n
at Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshou
ld be aligned to the month (starting at the first and ending on the\nlast day of
the month).\nFor LTV requests there are no such restrictions.\nYou do not need
to supply a date range for the\n`reportsRequest.dateRanges` field." | 706 "segmentId": { |
746 }, | 707 "description": "The segment ID of a built-in or custom segme
nt, for example `gaid::-3`.", |
747 "name": { | 708 "type": "string" |
748 "description": "A unique name for the cohort. If not defined
name will be auto-generated\nwith values cohort_[1234...].", | |
749 "type": "string" | |
750 } | |
751 }, | |
752 "type": "object" | |
753 }, | |
754 "OrFiltersForSegment": { | |
755 "description": "A list of segment filters in the `OR` group are comb
ined with the logical OR\noperator.", | |
756 "id": "OrFiltersForSegment", | |
757 "properties": { | |
758 "segmentFilterClauses": { | |
759 "description": "List of segment filters to be combined with
a `OR` operator.", | |
760 "items": { | |
761 "$ref": "SegmentFilterClause" | |
762 }, | |
763 "type": "array" | |
764 } | |
765 }, | |
766 "type": "object" | |
767 }, | |
768 "SequenceSegment": { | |
769 "description": "Sequence conditions consist of one or more steps, wh
ere each step is defined\nby one or more dimension/metric conditions. Multiple s
teps can be combined\nwith special sequence operators.", | |
770 "id": "SequenceSegment", | |
771 "properties": { | |
772 "firstStepShouldMatchFirstHit": { | |
773 "description": "If set, first step condition must match the
first hit of the visitor (in\nthe date range).", | |
774 "type": "boolean" | |
775 }, | |
776 "segmentSequenceSteps": { | |
777 "description": "The list of steps in the sequence.", | |
778 "items": { | |
779 "$ref": "SegmentSequenceStep" | |
780 }, | |
781 "type": "array" | |
782 } | |
783 }, | |
784 "type": "object" | |
785 }, | |
786 "SegmentFilter": { | |
787 "description": "SegmentFilter defines the segment to be either a sim
ple or a sequence\nsegment. A simple segment condition contains dimension and me
tric conditions\nto select the sessions or users. A sequence segment condition c
an be used to\nselect users or sessions based on sequential conditions.", | |
788 "id": "SegmentFilter", | |
789 "properties": { | |
790 "sequenceSegment": { | |
791 "$ref": "SequenceSegment", | |
792 "description": "Sequence conditions consist of one or more s
teps, where each step is\ndefined by one or more dimension/metric conditions. Mu
ltiple steps can\nbe combined with special sequence operators." | |
793 }, | |
794 "not": { | |
795 "description": "If true, match the complement of simple or s
equence segment.\nFor example, to match all visits not from \"New York\", we can
define the\nsegment as follows:\n\n \"sessionSegment\": {\n \"segme
ntFilters\": [{\n \"simpleSegment\" :{\n \"orFiltersForSegme
nt\": [{\n \"segmentFilterClauses\":[{\n \"dimension
Filter\": {\n \"dimensionName\": \"ga:city\",\n
\"expressions\": [\"New York\"]\n }\n }]\n
}]\n },\n \"not\": \"True\"\n }]\n },", | |
796 "type": "boolean" | |
797 }, | |
798 "simpleSegment": { | |
799 "$ref": "SimpleSegment", | |
800 "description": "A Simple segment conditions consist of one o
r more dimension/metric\nconditions that can be combined" | |
801 } | |
802 }, | |
803 "type": "object" | |
804 }, | |
805 "PivotHeaderEntry": { | |
806 "description": "The headers for the each of the metric column corres
ponding to the metrics\nrequested in the pivots section of the response.", | |
807 "id": "PivotHeaderEntry", | |
808 "properties": { | |
809 "dimensionNames": { | |
810 "description": "The name of the dimensions in the pivot resp
onse.", | |
811 "items": { | |
812 "type": "string" | |
813 }, | |
814 "type": "array" | |
815 }, | |
816 "dimensionValues": { | |
817 "description": "The values for the dimensions in the pivot."
, | |
818 "items": { | |
819 "type": "string" | |
820 }, | |
821 "type": "array" | |
822 }, | |
823 "metric": { | |
824 "$ref": "MetricHeaderEntry", | |
825 "description": "The metric header for the metric in the pivo
t." | |
826 } | |
827 }, | |
828 "type": "object" | |
829 }, | |
830 "DimensionFilterClause": { | |
831 "description": "A group of dimension filters. Set the operator value
to specify how\nthe filters are logically combined.", | |
832 "id": "DimensionFilterClause", | |
833 "properties": { | |
834 "operator": { | |
835 "description": "The operator for combining multiple dimensio
n filters. If unspecified, it\nis treated as an `OR`.", | |
836 "enum": [ | |
837 "OPERATOR_UNSPECIFIED", | |
838 "OR", | |
839 "AND" | |
840 ], | |
841 "enumDescriptions": [ | |
842 "Unspecified operator. It is treated as an `OR`.", | |
843 "The logical `OR` operator.", | |
844 "The logical `AND` operator." | |
845 ], | |
846 "type": "string" | |
847 }, | |
848 "filters": { | |
849 "description": "The repeated set of filters. They are logica
lly combined based on the\noperator specified.", | |
850 "items": { | |
851 "$ref": "DimensionFilter" | |
852 }, | |
853 "type": "array" | |
854 } | 709 } |
855 }, | 710 }, |
856 "type": "object" | 711 "type": "object" |
857 }, | 712 }, |
858 "SegmentSequenceStep": { | 713 "SegmentSequenceStep": { |
859 "description": "A segment sequence definition.", | 714 "description": "A segment sequence definition.", |
860 "id": "SegmentSequenceStep", | 715 "id": "SegmentSequenceStep", |
861 "properties": { | 716 "properties": { |
| 717 "orFiltersForSegment": { |
| 718 "description": "A sequence is specified with a list of Or gr
ouped filters which are\ncombined with `AND` operator.", |
| 719 "items": { |
| 720 "$ref": "OrFiltersForSegment" |
| 721 }, |
| 722 "type": "array" |
| 723 }, |
862 "matchType": { | 724 "matchType": { |
863 "description": "Specifies if the step immediately precedes o
r can be any time before the\nnext step.", | 725 "description": "Specifies if the step immediately precedes o
r can be any time before the\nnext step.", |
864 "enum": [ | 726 "enum": [ |
865 "UNSPECIFIED_MATCH_TYPE", | 727 "UNSPECIFIED_MATCH_TYPE", |
866 "PRECEDES", | 728 "PRECEDES", |
867 "IMMEDIATELY_PRECEDES" | 729 "IMMEDIATELY_PRECEDES" |
868 ], | 730 ], |
869 "enumDescriptions": [ | 731 "enumDescriptions": [ |
870 "Unspecified match type is treated as precedes.", | 732 "Unspecified match type is treated as precedes.", |
871 "Operator indicates that the previous step precedes the
next step.", | 733 "Operator indicates that the previous step precedes the
next step.", |
872 "Operator indicates that the previous step immediately p
recedes the next\nstep." | 734 "Operator indicates that the previous step immediately p
recedes the next\nstep." |
873 ], | 735 ], |
874 "type": "string" | 736 "type": "string" |
875 }, | 737 } |
876 "orFiltersForSegment": { | 738 }, |
877 "description": "A sequence is specified with a list of Or gr
ouped filters which are\ncombined with `AND` operator.", | 739 "type": "object" |
878 "items": { | 740 }, |
879 "$ref": "OrFiltersForSegment" | 741 "Metric": { |
880 }, | 742 "description": "[Metrics](https://support.google.com/analytics/answe
r/1033861)\nare the quantitative measurements. For example, the metric `ga:users
`\nindicates the total number of users for the requested time period.", |
881 "type": "array" | 743 "id": "Metric", |
882 } | 744 "properties": { |
883 }, | 745 "alias": { |
884 "type": "object" | 746 "description": "An alias for the metric expression is an alt
ernate name for the\nexpression. The alias can be used for filtering and sorting
. This field\nis optional and is useful if the expression is not a single metric
but\na complex expression which cannot be used in filtering and sorting.\nThe a
lias is also used in the response column header.", |
885 }, | 747 "type": "string" |
886 "Pivot": { | 748 }, |
887 "description": "The Pivot describes the pivot section in the request
.\nThe Pivot helps rearrange the information in the table for certain reports\nb
y pivoting your data on a second dimension.", | 749 "expression": { |
888 "id": "Pivot", | 750 "description": "A metric expression in the request. An expre
ssion is constructed from one\nor more metrics and numbers. Accepted operators i
nclude: Plus (+), Minus\n(-), Negation (Unary -), Divided by (/), Multiplied by
(*), Parenthesis,\nPositive cardinal numbers (0-9), can include decimals and is
limited to\n1024 characters. Example `ga:totalRefunds/ga:users`, in most cases t
he\nmetric expression is just a single metric name like `ga:users`.\nAdding mixe
d `MetricType` (E.g., `CURRENCY` + `PERCENTAGE`) metrics\nwill result in unexpec
ted results.", |
889 "properties": { | 751 "type": "string" |
890 "dimensions": { | 752 }, |
891 "description": "A list of dimensions to show as pivot column
s. A Pivot can have a maximum\nof 4 dimensions. Pivot dimensions are part of the
restriction on the\ntotal number of dimensions allowed in the request.", | 753 "formattingType": { |
892 "items": { | 754 "description": "Specifies how the metric expression should b
e formatted, for example\n`INTEGER`.", |
893 "$ref": "Dimension" | |
894 }, | |
895 "type": "array" | |
896 }, | |
897 "metrics": { | |
898 "description": "The pivot metrics. Pivot metrics are part of
the\nrestriction on total number of metrics allowed in the request.", | |
899 "items": { | |
900 "$ref": "Metric" | |
901 }, | |
902 "type": "array" | |
903 }, | |
904 "maxGroupCount": { | |
905 "description": "Specifies the maximum number of groups to re
turn.\nThe default value is 10, also the maximum value is 1,000.", | |
906 "format": "int32", | |
907 "type": "integer" | |
908 }, | |
909 "dimensionFilterClauses": { | |
910 "description": "DimensionFilterClauses are logically combine
d with an `AND` operator: only\ndata that is included by all these DimensionFilt
erClauses contributes to\nthe values in this pivot region. Dimension filters can
be used to restrict\nthe columns shown in the pivot region. For example if you
have\n`ga:browser` as the requested dimension in the pivot region, and you\nspec
ify key filters to restrict `ga:browser` to only \"IE\" or \"Firefox\",\nthen on
ly those two browsers would show up as columns.", | |
911 "items": { | |
912 "$ref": "DimensionFilterClause" | |
913 }, | |
914 "type": "array" | |
915 }, | |
916 "startGroup": { | |
917 "description": "If k metrics were requested, then the respon
se will contain some\ndata-dependent multiple of k columns in the report. E.g.,
if you pivoted\non the dimension `ga:browser` then you'd get k columns for \"Fi
refox\", k\ncolumns for \"IE\", k columns for \"Chrome\", etc. The ordering of t
he groups\nof columns is determined by descending order of \"total\" for the fir
st of\nthe k values. Ties are broken by lexicographic ordering of the first\npi
vot dimension, then lexicographic ordering of the second pivot\ndimension, and s
o on. E.g., if the totals for the first value for\nFirefox, IE, and Chrome were
8, 2, 8, respectively, the order of columns\nwould be Chrome, Firefox, IE.\n\nT
he following let you choose which of the groups of k columns are\nincluded in th
e response.", | |
918 "format": "int32", | |
919 "type": "integer" | |
920 } | |
921 }, | |
922 "type": "object" | |
923 }, | |
924 "DateRangeValues": { | |
925 "description": "Used to return a list of metrics for a single DateRa
nge / dimension\ncombination", | |
926 "id": "DateRangeValues", | |
927 "properties": { | |
928 "values": { | |
929 "description": "Each value corresponds to each Metric in the
request.", | |
930 "items": { | |
931 "type": "string" | |
932 }, | |
933 "type": "array" | |
934 }, | |
935 "pivotValueRegions": { | |
936 "description": "The values of each pivot region.", | |
937 "items": { | |
938 "$ref": "PivotValueRegion" | |
939 }, | |
940 "type": "array" | |
941 } | |
942 }, | |
943 "type": "object" | |
944 }, | |
945 "MetricFilterClause": { | |
946 "description": "Represents a group of metric filters.\nSet the opera
tor value to specify how the filters are logically combined.", | |
947 "id": "MetricFilterClause", | |
948 "properties": { | |
949 "operator": { | |
950 "description": "The operator for combining multiple metric f
ilters. If unspecified, it is\ntreated as an `OR`.", | |
951 "enum": [ | |
952 "OPERATOR_UNSPECIFIED", | |
953 "OR", | |
954 "AND" | |
955 ], | |
956 "enumDescriptions": [ | |
957 "Unspecified operator. It is treated as an `OR`.", | |
958 "The logical `OR` operator.", | |
959 "The logical `AND` operator." | |
960 ], | |
961 "type": "string" | |
962 }, | |
963 "filters": { | |
964 "description": "The repeated set of filters. They are logica
lly combined based on the\noperator specified.", | |
965 "items": { | |
966 "$ref": "MetricFilter" | |
967 }, | |
968 "type": "array" | |
969 } | |
970 }, | |
971 "type": "object" | |
972 }, | |
973 "Segment": { | |
974 "description": "The segment definition, if the report needs to be se
gmented.\nA Segment is a subset of the Analytics data. For example, of the entir
e\nset of users, one Segment might be users from a particular country or city.", | |
975 "id": "Segment", | |
976 "properties": { | |
977 "dynamicSegment": { | |
978 "$ref": "DynamicSegment", | |
979 "description": "A dynamic segment definition in the request.
" | |
980 }, | |
981 "segmentId": { | |
982 "description": "The segment ID of a built-in or custom segme
nt, for example `gaid::-3`.", | |
983 "type": "string" | |
984 } | |
985 }, | |
986 "type": "object" | |
987 }, | |
988 "DateRange": { | |
989 "description": "A contiguous set of days: startDate, startDate + 1 d
ay, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://e
n.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", | |
990 "id": "DateRange", | |
991 "properties": { | |
992 "startDate": { | |
993 "description": "The start date for the query in the format `
YYYY-MM-DD`.", | |
994 "type": "string" | |
995 }, | |
996 "endDate": { | |
997 "description": "The end date for the query in the format `YY
YY-MM-DD`.", | |
998 "type": "string" | |
999 } | |
1000 }, | |
1001 "type": "object" | |
1002 }, | |
1003 "ReportRow": { | |
1004 "description": "A row in the report.", | |
1005 "id": "ReportRow", | |
1006 "properties": { | |
1007 "dimensions": { | |
1008 "description": "List of requested dimensions.", | |
1009 "items": { | |
1010 "type": "string" | |
1011 }, | |
1012 "type": "array" | |
1013 }, | |
1014 "metrics": { | |
1015 "description": "List of metrics for each requested DateRange
.", | |
1016 "items": { | |
1017 "$ref": "DateRangeValues" | |
1018 }, | |
1019 "type": "array" | |
1020 } | |
1021 }, | |
1022 "type": "object" | |
1023 }, | |
1024 "CohortGroup": { | |
1025 "description": "Defines a cohort group.\nFor example:\n\n \"cohor
tGroup\": {\n \"cohorts\": [{\n \"name\": \"cohort 1\",\n \"t
ype\": \"FIRST_VISIT_DATE\",\n \"dateRange\": { \"startDate\": \"2015-08-
01\", \"endDate\": \"2015-08-01\" }\n },{\n \"name\": \"cohort 2\"\n
\"type\": \"FIRST_VISIT_DATE\"\n \"dateRange\": { \"startDate\"
: \"2015-07-01\", \"endDate\": \"2015-07-01\" }\n }]\n }", | |
1026 "id": "CohortGroup", | |
1027 "properties": { | |
1028 "lifetimeValue": { | |
1029 "description": "Enable Life Time Value (LTV). LTV measures
lifetime value for users\nacquired through different channels.\nPlease see:\n[Co
hort Analysis](https://support.google.com/analytics/answer/6074676) and\n[Lifeti
me Value](https://support.google.com/analytics/answer/6182550)\nIf the value of
lifetimeValue is false:\n\n- The metric values are similar to the values in the
web interface cohort\n report.\n- The cohort definition date ranges must be ali
gned to the calendar week\n and month. i.e. while requesting `ga:cohortNthWeek`
the `startDate` in\n the cohort definition should be a Sunday and the `endDate
` should be the\n following Saturday, and for `ga:cohortNthMonth`, the `startDa
te`\n should be the 1st of the month and `endDate` should be the last day\n of
the month.\n\nWhen the lifetimeValue is true:\n\n- The metric values will corre
spond to the values in the web interface\n LifeTime value report.\n- The Lifeti
me Value report shows you how user value (Revenue) and\n engagement (Appviews,
Goal Completions, Sessions, and Session Duration)\n grow during the 90 days aft
er a user is acquired.\n- The metrics are calculated as a cumulative average per
user per the time\n increment.\n- The cohort definition date ranges need not b
e aligned to the calendar\n week and month boundaries.\n- The `viewId` must be
an\n [app view ID](https://support.google.com/analytics/answer/2649553#WebVersu
sAppViews)", | |
1030 "type": "boolean" | |
1031 }, | |
1032 "cohorts": { | |
1033 "description": "The definition for the cohort.", | |
1034 "items": { | |
1035 "$ref": "Cohort" | |
1036 }, | |
1037 "type": "array" | |
1038 } | |
1039 }, | |
1040 "type": "object" | |
1041 }, | |
1042 "GetReportsResponse": { | |
1043 "description": "The main response class which holds the reports from
the Reporting API\n`batchGet` call.", | |
1044 "id": "GetReportsResponse", | |
1045 "properties": { | |
1046 "reports": { | |
1047 "description": "Responses corresponding to each of the reque
st.", | |
1048 "items": { | |
1049 "$ref": "Report" | |
1050 }, | |
1051 "type": "array" | |
1052 } | |
1053 }, | |
1054 "type": "object" | |
1055 }, | |
1056 "MetricHeaderEntry": { | |
1057 "description": "Header for the metrics.", | |
1058 "id": "MetricHeaderEntry", | |
1059 "properties": { | |
1060 "type": { | |
1061 "description": "The type of the metric, for example `INTEGER
`.", | |
1062 "enum": [ | 755 "enum": [ |
1063 "METRIC_TYPE_UNSPECIFIED", | 756 "METRIC_TYPE_UNSPECIFIED", |
1064 "INTEGER", | 757 "INTEGER", |
1065 "FLOAT", | 758 "FLOAT", |
1066 "CURRENCY", | 759 "CURRENCY", |
1067 "PERCENT", | 760 "PERCENT", |
1068 "TIME" | 761 "TIME" |
1069 ], | 762 ], |
1070 "enumDescriptions": [ | 763 "enumDescriptions": [ |
1071 "Metric type is unspecified.", | 764 "Metric type is unspecified.", |
1072 "Integer metric.", | 765 "Integer metric.", |
1073 "Float metric.", | 766 "Float metric.", |
1074 "Currency metric.", | 767 "Currency metric.", |
1075 "Percentage metric.", | 768 "Percentage metric.", |
1076 "Time metric in `HH:MM:SS` format." | 769 "Time metric in `HH:MM:SS` format." |
1077 ], | 770 ], |
1078 "type": "string" | 771 "type": "string" |
1079 }, | 772 } |
1080 "name": { | 773 }, |
1081 "description": "The name of the header.", | 774 "type": "object" |
| 775 }, |
| 776 "PivotValueRegion": { |
| 777 "description": "The metric values in the pivot region.", |
| 778 "id": "PivotValueRegion", |
| 779 "properties": { |
| 780 "values": { |
| 781 "description": "The values of the metrics in each of the piv
ot regions.", |
| 782 "items": { |
| 783 "type": "string" |
| 784 }, |
| 785 "type": "array" |
| 786 } |
| 787 }, |
| 788 "type": "object" |
| 789 }, |
| 790 "Report": { |
| 791 "description": "The data response corresponding to the request.", |
| 792 "id": "Report", |
| 793 "properties": { |
| 794 "columnHeader": { |
| 795 "$ref": "ColumnHeader", |
| 796 "description": "The column headers." |
| 797 }, |
| 798 "data": { |
| 799 "$ref": "ReportData", |
| 800 "description": "Response data." |
| 801 }, |
| 802 "nextPageToken": { |
| 803 "description": "Page token to retrieve the next page of resu
lts in the list.", |
| 804 "type": "string" |
| 805 } |
| 806 }, |
| 807 "type": "object" |
| 808 }, |
| 809 "PivotHeader": { |
| 810 "description": "The headers for each of the pivot sections defined i
n the request.", |
| 811 "id": "PivotHeader", |
| 812 "properties": { |
| 813 "pivotHeaderEntries": { |
| 814 "description": "A single pivot section header.", |
| 815 "items": { |
| 816 "$ref": "PivotHeaderEntry" |
| 817 }, |
| 818 "type": "array" |
| 819 }, |
| 820 "totalPivotGroupsCount": { |
| 821 "description": "The total number of groups for this pivot.", |
| 822 "format": "int32", |
| 823 "type": "integer" |
| 824 } |
| 825 }, |
| 826 "type": "object" |
| 827 }, |
| 828 "DateRange": { |
| 829 "description": "A contiguous set of days: startDate, startDate + 1 d
ay, ..., endDate.\nThe start and end dates are specified in\n[ISO8601](https://e
n.wikipedia.org/wiki/ISO_8601) date format `YYYY-MM-DD`.", |
| 830 "id": "DateRange", |
| 831 "properties": { |
| 832 "endDate": { |
| 833 "description": "The end date for the query in the format `YY
YY-MM-DD`.", |
| 834 "type": "string" |
| 835 }, |
| 836 "startDate": { |
| 837 "description": "The start date for the query in the format `
YYYY-MM-DD`.", |
1082 "type": "string" | 838 "type": "string" |
1083 } | 839 } |
1084 }, | 840 }, |
1085 "type": "object" | 841 "type": "object" |
1086 }, | 842 }, |
1087 "MetricFilter": { | 843 "MetricFilter": { |
1088 "description": "MetricFilter specifies the filter on a metric.", | 844 "description": "MetricFilter specifies the filter on a metric.", |
1089 "id": "MetricFilter", | 845 "id": "MetricFilter", |
1090 "properties": { | 846 "properties": { |
1091 "metricName": { | 847 "metricName": { |
1092 "description": "The metric that will be filtered on. A metri
cFilter must contain a metric\nname. A metric name can be an alias earlier defin
ed as a metric or it can\nalso be a metric expression.", | 848 "description": "The metric that will be filtered on. A metri
cFilter must contain a metric\nname. A metric name can be an alias earlier defin
ed as a metric or it can\nalso be a metric expression.", |
1093 "type": "string" | 849 "type": "string" |
1094 }, | 850 }, |
| 851 "comparisonValue": { |
| 852 "description": "The value to compare against.", |
| 853 "type": "string" |
| 854 }, |
1095 "operator": { | 855 "operator": { |
1096 "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREAT
ER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_M
ISSING`, checks if the metric is missing and would ignore the\ncomparisonValue."
, | 856 "description": "Is the metric `EQUAL`, `LESS_THAN` or `GREAT
ER_THAN` the\ncomparisonValue, the default is `EQUAL`. If the operator is\n`IS_M
ISSING`, checks if the metric is missing and would ignore the\ncomparisonValue."
, |
1097 "enum": [ | 857 "enum": [ |
1098 "OPERATOR_UNSPECIFIED", | 858 "OPERATOR_UNSPECIFIED", |
1099 "EQUAL", | 859 "EQUAL", |
1100 "LESS_THAN", | 860 "LESS_THAN", |
1101 "GREATER_THAN", | 861 "GREATER_THAN", |
1102 "IS_MISSING" | 862 "IS_MISSING" |
1103 ], | 863 ], |
1104 "enumDescriptions": [ | 864 "enumDescriptions": [ |
1105 "If the operator is not specified, it is treated as `EQU
AL`.", | 865 "If the operator is not specified, it is treated as `EQU
AL`.", |
1106 "Should the value of the metric be exactly equal to the
comparison value.", | 866 "Should the value of the metric be exactly equal to the
comparison value.", |
1107 "Should the value of the metric be less than to the comp
arison value.", | 867 "Should the value of the metric be less than to the comp
arison value.", |
1108 "Should the value of the metric be greater than to the c
omparison value.", | 868 "Should the value of the metric be greater than to the c
omparison value.", |
1109 "Validates if the metric is missing.\nDoesn't take compa
risonValue into account." | 869 "Validates if the metric is missing.\nDoesn't take compa
risonValue into account." |
1110 ], | 870 ], |
1111 "type": "string" | 871 "type": "string" |
1112 }, | 872 }, |
1113 "comparisonValue": { | |
1114 "description": "The value to compare against.", | |
1115 "type": "string" | |
1116 }, | |
1117 "not": { | 873 "not": { |
1118 "description": "Logical `NOT` operator. If this boolean is s
et to true, then the matching\nmetric values will be excluded in the report. The
default is false.", | 874 "description": "Logical `NOT` operator. If this boolean is s
et to true, then the matching\nmetric values will be excluded in the report. The
default is false.", |
1119 "type": "boolean" | 875 "type": "boolean" |
1120 } | 876 } |
1121 }, | 877 }, |
1122 "type": "object" | 878 "type": "object" |
1123 }, | 879 }, |
| 880 "ReportRequest": { |
| 881 "description": "The main request class which specifies the Reporting
API request.", |
| 882 "id": "ReportRequest", |
| 883 "properties": { |
| 884 "metrics": { |
| 885 "description": "The metrics requested.\nRequests must specif
y at least one metric. Requests can have a\ntotal of 10 metrics.", |
| 886 "items": { |
| 887 "$ref": "Metric" |
| 888 }, |
| 889 "type": "array" |
| 890 }, |
| 891 "dimensionFilterClauses": { |
| 892 "description": "The dimension filter clauses for filtering D
imension Values. They are\nlogically combined with the `AND` operator. Note that
filtering occurs\nbefore any dimensions are aggregated, so that the returned me
trics\nrepresent the total for only the relevant dimensions.", |
| 893 "items": { |
| 894 "$ref": "DimensionFilterClause" |
| 895 }, |
| 896 "type": "array" |
| 897 }, |
| 898 "orderBys": { |
| 899 "description": "Sort order on output rows. To compare two ro
ws, the elements of the\nfollowing are applied in order until a difference is fo
und. All date\nranges in the output get the same row order.", |
| 900 "items": { |
| 901 "$ref": "OrderBy" |
| 902 }, |
| 903 "type": "array" |
| 904 }, |
| 905 "segments": { |
| 906 "description": "Segment the data returned for the request. A
segment definition helps look\nat a subset of the segment request. A request ca
n contain up to four\nsegments. Every [ReportRequest](#ReportRequest) within a\n
`batchGet` method must contain the same `segments` definition. Requests\nwith se
gments must have the `ga:segment` dimension.", |
| 907 "items": { |
| 908 "$ref": "Segment" |
| 909 }, |
| 910 "type": "array" |
| 911 }, |
| 912 "samplingLevel": { |
| 913 "description": "The desired report\n[sample](https://support
.google.com/analytics/answer/2637192) size.\nIf the the `samplingLevel` field is
unspecified the `DEFAULT` sampling\nlevel is used. Every [ReportRequest](#Repor
tRequest) within a\n`batchGet` method must contain the same `samplingLevel` defi
nition. See\n[developer guide](/analytics/devguides/reporting/core/v4/basics#sam
pling)\n for details.", |
| 914 "enum": [ |
| 915 "SAMPLING_UNSPECIFIED", |
| 916 "DEFAULT", |
| 917 "SMALL", |
| 918 "LARGE" |
| 919 ], |
| 920 "enumDescriptions": [ |
| 921 "If the `samplingLevel` field is unspecified the `DEFAUL
T` sampling level\nis used.", |
| 922 "Returns response with a sample size that balances speed
and\naccuracy.", |
| 923 "It returns a fast response with a smaller sampling size
.", |
| 924 "Returns a more accurate response using a large sampling
size. But this\nmay result in response being slower." |
| 925 ], |
| 926 "type": "string" |
| 927 }, |
| 928 "dimensions": { |
| 929 "description": "The dimensions requested.\nRequests can have
a total of 7 dimensions.", |
| 930 "items": { |
| 931 "$ref": "Dimension" |
| 932 }, |
| 933 "type": "array" |
| 934 }, |
| 935 "dateRanges": { |
| 936 "description": "Date ranges in the request. The request can
have a maximum of 2 date\nranges. The response will contain a set of metric valu
es for each\ncombination of the dimensions for each date range in the request. S
o, if\nthere are two date ranges, there will be two set of metric values, one fo
r\nthe original date range and one for the second date range.\nThe `reportReques
t.dateRanges` field should not be specified for cohorts\nor Lifetime value reque
sts.\nIf a date range is not provided, the default date range is (startDate:\ncu
rrent date - 7 days, endDate: current date - 1 day). Every\n[ReportRequest](#Rep
ortRequest) within a `batchGet` method must\ncontain the same `dateRanges` defin
ition.", |
| 937 "items": { |
| 938 "$ref": "DateRange" |
| 939 }, |
| 940 "type": "array" |
| 941 }, |
| 942 "pageToken": { |
| 943 "description": "A continuation token to get the next page of
the results. Adding this to\nthe request will return the rows after the pageTok
en. The pageToken should\nbe the value returned in the nextPageToken parameter i
n the response to\nthe GetReports request.", |
| 944 "type": "string" |
| 945 }, |
| 946 "pivots": { |
| 947 "description": "The pivot definitions. Requests can have a m
aximum of 2 pivots.", |
| 948 "items": { |
| 949 "$ref": "Pivot" |
| 950 }, |
| 951 "type": "array" |
| 952 }, |
| 953 "includeEmptyRows": { |
| 954 "description": "If set to false, the response does not inclu
de rows if all the retrieved\nmetrics are equal to zero. The default is false wh
ich will exclude these\nrows.", |
| 955 "type": "boolean" |
| 956 }, |
| 957 "metricFilterClauses": { |
| 958 "description": "The metric filter clauses. They are logicall
y combined with the `AND`\noperator. Metric filters look at only the first date
range and not the\ncomparing date range. Note that filtering on metrics occurs
after the\nmetrics are aggregated.", |
| 959 "items": { |
| 960 "$ref": "MetricFilterClause" |
| 961 }, |
| 962 "type": "array" |
| 963 }, |
| 964 "pageSize": { |
| 965 "description": "Page size is for paging and specifies the ma
ximum number of returned rows.\nPage size should be >= 0. A query returns the de
fault of 1,000 rows.\nThe Analytics Core Reporting API returns a maximum of 10,0
00 rows per\nrequest, no matter how many you ask for. It can also return fewer r
ows\nthan requested, if there aren't as many dimension segments as you expect.\n
For instance, there are fewer than 300 possible values for `ga:country`,\nso whe
n segmenting only by country, you can't get more than 300 rows,\neven if you set
`pageSize` to a higher value.", |
| 966 "format": "int32", |
| 967 "type": "integer" |
| 968 }, |
| 969 "hideValueRanges": { |
| 970 "description": "If set to true, hides the minimum and maximu
m across all matching rows.\nThe default is false and the value ranges are retur
ned.", |
| 971 "type": "boolean" |
| 972 }, |
| 973 "hideTotals": { |
| 974 "description": "If set to true, hides the total of all metri
cs for all the matching rows,\nfor every date range. The default false and will
return the totals.", |
| 975 "type": "boolean" |
| 976 }, |
| 977 "cohortGroup": { |
| 978 "$ref": "CohortGroup", |
| 979 "description": "Cohort group associated with this request. I
f there is a cohort group\nin the request the `ga:cohort` dimension must be pres
ent.\nEvery [ReportRequest](#ReportRequest) within a `batchGet` method must\ncon
tain the same `cohortGroup` definition." |
| 980 }, |
| 981 "filtersExpression": { |
| 982 "description": "Dimension or metric filters that restrict th
e data returned for your\nrequest. To use the `filtersExpression`, supply a dime
nsion or metric on\nwhich to filter, followed by the filter expression. For exam
ple, the\nfollowing expression selects `ga:browser` dimension which starts with\
nFirefox; `ga:browser=~^Firefox`. For more information on dimensions\nand metric
filters, see\n[Filters reference](https://developers.google.com/analytics/devgu
ides/reporting/core/v3/reference#filters).", |
| 983 "type": "string" |
| 984 }, |
| 985 "viewId": { |
| 986 "description": "The Analytics\n[view ID](https://support.goo
gle.com/analytics/answer/1009618)\nfrom which to retrieve data. Every [ReportReq
uest](#ReportRequest)\nwithin a `batchGet` method must contain the same `viewId`
.", |
| 987 "type": "string" |
| 988 } |
| 989 }, |
| 990 "type": "object" |
| 991 }, |
1124 "Dimension": { | 992 "Dimension": { |
1125 "description": "[Dimensions](https://support.google.com/analytics/an
swer/1033861)\nare attributes of your data. For example, the dimension `ga:city`
\nindicates the city, for example, \"Paris\" or \"New York\", from which\na sess
ion originates.", | 993 "description": "[Dimensions](https://support.google.com/analytics/an
swer/1033861)\nare attributes of your data. For example, the dimension `ga:city`
\nindicates the city, for example, \"Paris\" or \"New York\", from which\na sess
ion originates.", |
1126 "id": "Dimension", | 994 "id": "Dimension", |
1127 "properties": { | 995 "properties": { |
1128 "histogramBuckets": { | 996 "histogramBuckets": { |
1129 "description": "If non-empty, we place dimension values into
buckets after string to\nint64. Dimension values that are not the string repres
entation of an\nintegral value will be converted to zero. The bucket values hav
e to be in\nincreasing order. Each bucket is closed on the lower end, and open
on the\nupper end. The \"first\" bucket includes all values less than the first\
nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nva
lues that fall in a bucket get transformed to a new dimension value. For\nexampl
e, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing bucke
ts:\n\n- bucket #1: values < 0, dimension value \"<0\"\n- bucket #2: values in [
0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2
\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in
[4,7), dimension value \"4-6\"\n- bucket #6: values >= 7, dimension value \"7+\"
\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nth
at dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for
that purpose. Without that the dimension values\nwill be sorted according to di
ctionary\n(lexicographic) order. For example the ascending dictionary order is:\
n\n \"<50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGR
AM_BUCKET` order is:\n\n \"<50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe c
lient has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a his
togram-mutated dimension.", | 997 "description": "If non-empty, we place dimension values into
buckets after string to\nint64. Dimension values that are not the string repres
entation of an\nintegral value will be converted to zero. The bucket values hav
e to be in\nincreasing order. Each bucket is closed on the lower end, and open
on the\nupper end. The \"first\" bucket includes all values less than the first\
nboundary, the \"last\" bucket includes all values up to infinity. Dimension\nva
lues that fall in a bucket get transformed to a new dimension value. For\nexampl
e, if one gives a list of \"0, 1, 3, 4, 7\", then we return the\nfollowing bucke
ts:\n\n- bucket #1: values < 0, dimension value \"<0\"\n- bucket #2: values in [
0,1), dimension value \"0\"\n- bucket #3: values in [1,3), dimension value \"1-2
\"\n- bucket #4: values in [3,4), dimension value \"3\"\n- bucket #5: values in
[4,7), dimension value \"4-6\"\n- bucket #6: values >= 7, dimension value \"7+\"
\n\nNOTE: If you are applying histogram mutation on any dimension, and using\nth
at dimension in sort, you will want to use the sort type\n`HISTOGRAM_BUCKET` for
that purpose. Without that the dimension values\nwill be sorted according to di
ctionary\n(lexicographic) order. For example the ascending dictionary order is:\
n\n \"<50\", \"1001+\", \"121-1000\", \"50-120\"\n\nAnd the ascending `HISTOGR
AM_BUCKET` order is:\n\n \"<50\", \"50-120\", \"121-1000\", \"1001+\"\n\nThe c
lient has to explicitly request `\"orderType\": \"HISTOGRAM_BUCKET\"`\nfor a his
togram-mutated dimension.", |
1130 "items": { | 998 "items": { |
1131 "format": "int64", | 999 "format": "int64", |
1132 "type": "string" | 1000 "type": "string" |
1133 }, | 1001 }, |
1134 "type": "array" | 1002 "type": "array" |
1135 }, | 1003 }, |
1136 "name": { | 1004 "name": { |
1137 "description": "Name of the dimension to fetch, for example
`ga:browser`.", | 1005 "description": "Name of the dimension to fetch, for example
`ga:browser`.", |
1138 "type": "string" | 1006 "type": "string" |
1139 } | 1007 } |
1140 }, | 1008 }, |
1141 "type": "object" | 1009 "type": "object" |
1142 }, | 1010 }, |
1143 "PivotValueRegion": { | 1011 "SimpleSegment": { |
1144 "description": "The metric values in the pivot region.", | 1012 "description": "A Simple segment conditions consist of one or more d
imension/metric\nconditions that can be combined.", |
1145 "id": "PivotValueRegion", | 1013 "id": "SimpleSegment", |
1146 "properties": { | 1014 "properties": { |
1147 "values": { | 1015 "orFiltersForSegment": { |
1148 "description": "The values of the metrics in each of the piv
ot regions.", | 1016 "description": "A list of segment filters groups which are c
ombined with logical `AND`\noperator.", |
| 1017 "items": { |
| 1018 "$ref": "OrFiltersForSegment" |
| 1019 }, |
| 1020 "type": "array" |
| 1021 } |
| 1022 }, |
| 1023 "type": "object" |
| 1024 }, |
| 1025 "DynamicSegment": { |
| 1026 "description": "Dynamic segment definition for defining the segment
within the request.\nA segment can select users, sessions or both.", |
| 1027 "id": "DynamicSegment", |
| 1028 "properties": { |
| 1029 "sessionSegment": { |
| 1030 "$ref": "SegmentDefinition", |
| 1031 "description": "Session Segment to select sessions to includ
e in the segment." |
| 1032 }, |
| 1033 "name": { |
| 1034 "description": "The name of the dynamic segment.", |
| 1035 "type": "string" |
| 1036 }, |
| 1037 "userSegment": { |
| 1038 "$ref": "SegmentDefinition", |
| 1039 "description": "User Segment to select users to include in t
he segment." |
| 1040 } |
| 1041 }, |
| 1042 "type": "object" |
| 1043 }, |
| 1044 "ColumnHeader": { |
| 1045 "description": "Column headers.", |
| 1046 "id": "ColumnHeader", |
| 1047 "properties": { |
| 1048 "dimensions": { |
| 1049 "description": "The dimension names in the response.", |
1149 "items": { | 1050 "items": { |
1150 "type": "string" | 1051 "type": "string" |
1151 }, | 1052 }, |
| 1053 "type": "array" |
| 1054 }, |
| 1055 "metricHeader": { |
| 1056 "$ref": "MetricHeader", |
| 1057 "description": "Metric headers for the metrics in the respon
se." |
| 1058 } |
| 1059 }, |
| 1060 "type": "object" |
| 1061 }, |
| 1062 "SegmentFilterClause": { |
| 1063 "description": "Filter Clause to be used in a segment definition, ca
n be wither a metric or\na dimension filter.", |
| 1064 "id": "SegmentFilterClause", |
| 1065 "properties": { |
| 1066 "metricFilter": { |
| 1067 "$ref": "SegmentMetricFilter", |
| 1068 "description": "Metric Filter for the segment definition." |
| 1069 }, |
| 1070 "not": { |
| 1071 "description": "Matches the complement (`!`) of the filter."
, |
| 1072 "type": "boolean" |
| 1073 }, |
| 1074 "dimensionFilter": { |
| 1075 "$ref": "SegmentDimensionFilter", |
| 1076 "description": "Dimension Filter for the segment definition.
" |
| 1077 } |
| 1078 }, |
| 1079 "type": "object" |
| 1080 }, |
| 1081 "MetricFilterClause": { |
| 1082 "description": "Represents a group of metric filters.\nSet the opera
tor value to specify how the filters are logically combined.", |
| 1083 "id": "MetricFilterClause", |
| 1084 "properties": { |
| 1085 "operator": { |
| 1086 "description": "The operator for combining multiple metric f
ilters. If unspecified, it is\ntreated as an `OR`.", |
| 1087 "enum": [ |
| 1088 "OPERATOR_UNSPECIFIED", |
| 1089 "OR", |
| 1090 "AND" |
| 1091 ], |
| 1092 "enumDescriptions": [ |
| 1093 "Unspecified operator. It is treated as an `OR`.", |
| 1094 "The logical `OR` operator.", |
| 1095 "The logical `AND` operator." |
| 1096 ], |
| 1097 "type": "string" |
| 1098 }, |
| 1099 "filters": { |
| 1100 "description": "The repeated set of filters. They are logica
lly combined based on the\noperator specified.", |
| 1101 "items": { |
| 1102 "$ref": "MetricFilter" |
| 1103 }, |
| 1104 "type": "array" |
| 1105 } |
| 1106 }, |
| 1107 "type": "object" |
| 1108 }, |
| 1109 "Cohort": { |
| 1110 "description": "Defines a cohort. A cohort is a group of users who s
hare a common\ncharacteristic. For example, all users with the same acquisition
date\nbelong to the same cohort.", |
| 1111 "id": "Cohort", |
| 1112 "properties": { |
| 1113 "name": { |
| 1114 "description": "A unique name for the cohort. If not defined
name will be auto-generated\nwith values cohort_[1234...].", |
| 1115 "type": "string" |
| 1116 }, |
| 1117 "dateRange": { |
| 1118 "$ref": "DateRange", |
| 1119 "description": "This is used for `FIRST_VISIT_DATE` cohort,
the cohort selects users\nwhose first visit date is between start date and end d
ate defined in the\nDateRange. The date ranges should be aligned for cohort requ
ests. If the\nrequest contains `ga:cohortNthDay` it should be exactly one day lo
ng,\nif `ga:cohortNthWeek` it should be aligned to the week boundary (starting\n
at Sunday and ending Saturday), and for `ga:cohortNthMonth` the date range\nshou
ld be aligned to the month (starting at the first and ending on the\nlast day of
the month).\nFor LTV requests there are no such restrictions.\nYou do not need
to supply a date range for the\n`reportsRequest.dateRanges` field." |
| 1120 }, |
| 1121 "type": { |
| 1122 "description": "Type of the cohort. The only supported type
as of now is\n`FIRST_VISIT_DATE`. If this field is unspecified the cohort is tre
ated\nas `FIRST_VISIT_DATE` type cohort.", |
| 1123 "enum": [ |
| 1124 "UNSPECIFIED_COHORT_TYPE", |
| 1125 "FIRST_VISIT_DATE" |
| 1126 ], |
| 1127 "enumDescriptions": [ |
| 1128 "If unspecified it's treated as `FIRST_VISIT_DATE`.", |
| 1129 "Cohorts that are selected based on first visit date." |
| 1130 ], |
| 1131 "type": "string" |
| 1132 } |
| 1133 }, |
| 1134 "type": "object" |
| 1135 }, |
| 1136 "ReportRow": { |
| 1137 "description": "A row in the report.", |
| 1138 "id": "ReportRow", |
| 1139 "properties": { |
| 1140 "metrics": { |
| 1141 "description": "List of metrics for each requested DateRange
.", |
| 1142 "items": { |
| 1143 "$ref": "DateRangeValues" |
| 1144 }, |
| 1145 "type": "array" |
| 1146 }, |
| 1147 "dimensions": { |
| 1148 "description": "List of requested dimensions.", |
| 1149 "items": { |
| 1150 "type": "string" |
| 1151 }, |
1152 "type": "array" | 1152 "type": "array" |
1153 } | 1153 } |
1154 }, | 1154 }, |
1155 "type": "object" | 1155 "type": "object" |
1156 } | 1156 } |
1157 }, | 1157 }, |
1158 "servicePath": "", | 1158 "servicePath": "", |
1159 "title": "Google Analytics Reporting API", | 1159 "title": "Google Analytics Reporting API", |
1160 "version": "v4" | 1160 "version": "v4" |
1161 } | 1161 } |
OLD | NEW |