| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, h1, h2, h3, div, span, p, pre, a { |
| 5 |
margin: 0; |
| 6 |
padding: 0; |
| 7 |
border: 0; |
| 8 |
font-weight: inherit; |
| 9 |
font-style: inherit; |
| 10 |
font-size: 100%; |
| 11 |
font-family: inherit; |
| 12 |
vertical-align: baseline; |
| 13 |
} |
| 14 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, h2, h3 { |
| 50 |
border-bottom: solid #CCC 1px; |
| 51 |
} |
| 52 |
|
| 53 |
.toc_element { |
| 54 |
margin-top: 0.5em; |
| 55 |
} |
| 56 |
|
| 57 |
.firstline { |
| 58 |
margin-left: 2 em; |
| 59 |
} |
| 60 |
|
| 61 |
.method { |
| 62 |
margin-top: 1em; |
| 63 |
border: solid 1px #CCC; |
| 64 |
padding: 1em; |
| 65 |
background: #EEE; |
| 66 |
} |
| 67 |
|
| 68 |
.details { |
| 69 |
font-weight: bold; |
| 70 |
font-size: 14px; |
| 71 |
} |
| 72 |
|
| 73 |
</style> |
| 74 |
|
| 75 |
<h1><a href="analyticsadmin_v1alpha.html">Google Analytics Admin API</a> . <a href="analyticsadmin_v1alpha.properties.html">properties</a> . <a href="analyticsadmin_v1alpha.properties.calculatedMetrics.html">calculatedMetrics</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#create">create(parent, body=None, calculatedMetricId=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Creates a CalculatedMetric.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">Deletes a CalculatedMetric on a property.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 88 |
<p class="firstline">Lookup for a single CalculatedMetric.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 91 |
<p class="firstline">Lists CalculatedMetrics on a property.</p> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#list_next">list_next()</a></code></p> |
| 94 |
<p class="firstline">Retrieves the next page of results.</p> |
| 95 |
<p class="toc_element"> |
| 96 |
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
| 97 |
<p class="firstline">Updates a CalculatedMetric on a property.</p> |
| 98 |
<h3>Method Details</h3> |
| 99 |
<div class="method"> |
| 100 |
<code class="details" id="close">close()</code> |
| 101 |
<pre>Close httplib2 connections.</pre> |
| 102 |
</div> |
| 103 |
|
| 104 |
<div class="method"> |
| 105 |
<code class="details" id="create">create(parent, body=None, calculatedMetricId=None, x__xgafv=None)</code> |
| 106 |
<pre>Creates a CalculatedMetric. |
| 107 |
|
| 108 |
Args: |
| 109 |
parent: string, Required. Format: properties/{property_id} Example: properties/1234 (required) |
| 110 |
body: object, The request body. |
| 111 |
The object takes the form of: |
| 112 |
|
| 113 |
{ # A definition for a calculated metric. |
| 114 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 115 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 116 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 117 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 118 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 119 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 120 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 121 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 122 |
"A String", |
| 123 |
], |
| 124 |
} |
| 125 |
|
| 126 |
calculatedMetricId: string, Required. The ID to use for the calculated metric which will become the final component of the calculated metric's resource name. This value should be 1-80 characters and valid characters are /[a-zA-Z0-9_]/, no spaces allowed. calculated_metric_id must be unique between all calculated metrics under a property. The calculated_metric_id is used when referencing this calculated metric from external APIs, for example, "calcMetric:{calculated_metric_id}". |
| 127 |
x__xgafv: string, V1 error format. |
| 128 |
Allowed values |
| 129 |
1 - v1 error format |
| 130 |
2 - v2 error format |
| 131 |
|
| 132 |
Returns: |
| 133 |
An object of the form: |
| 134 |
|
| 135 |
{ # A definition for a calculated metric. |
| 136 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 137 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 138 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 139 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 140 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 141 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 142 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 143 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 144 |
"A String", |
| 145 |
], |
| 146 |
}</pre> |
| 147 |
</div> |
| 148 |
|
| 149 |
<div class="method"> |
| 150 |
<code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 151 |
<pre>Deletes a CalculatedMetric on a property. |
| 152 |
|
| 153 |
Args: |
| 154 |
name: string, Required. The name of the CalculatedMetric to delete. Format: properties/{property_id}/calculatedMetrics/{calculated_metric_id} Example: properties/1234/calculatedMetrics/Metric01 (required) |
| 155 |
x__xgafv: string, V1 error format. |
| 156 |
Allowed values |
| 157 |
1 - v1 error format |
| 158 |
2 - v2 error format |
| 159 |
|
| 160 |
Returns: |
| 161 |
An object of the form: |
| 162 |
|
| 163 |
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
| 164 |
}</pre> |
| 165 |
</div> |
| 166 |
|
| 167 |
<div class="method"> |
| 168 |
<code class="details" id="get">get(name, x__xgafv=None)</code> |
| 169 |
<pre>Lookup for a single CalculatedMetric. |
| 170 |
|
| 171 |
Args: |
| 172 |
name: string, Required. The name of the CalculatedMetric to get. Format: properties/{property_id}/calculatedMetrics/{calculated_metric_id} Example: properties/1234/calculatedMetrics/Metric01 (required) |
| 173 |
x__xgafv: string, V1 error format. |
| 174 |
Allowed values |
| 175 |
1 - v1 error format |
| 176 |
2 - v2 error format |
| 177 |
|
| 178 |
Returns: |
| 179 |
An object of the form: |
| 180 |
|
| 181 |
{ # A definition for a calculated metric. |
| 182 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 183 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 184 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 185 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 186 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 187 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 188 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 189 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 190 |
"A String", |
| 191 |
], |
| 192 |
}</pre> |
| 193 |
</div> |
| 194 |
|
| 195 |
<div class="method"> |
| 196 |
<code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 197 |
<pre>Lists CalculatedMetrics on a property. |
| 198 |
|
| 199 |
Args: |
| 200 |
parent: string, Required. Example format: properties/1234 (required) |
| 201 |
pageSize: integer, Optional. The maximum number of resources to return. If unspecified, at most 50 resources will be returned. The maximum value is 200 (higher values will be coerced to the maximum). |
| 202 |
pageToken: string, Optional. A page token, received from a previous `ListCalculatedMetrics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCalculatedMetrics` must match the call that provided the page token. |
| 203 |
x__xgafv: string, V1 error format. |
| 204 |
Allowed values |
| 205 |
1 - v1 error format |
| 206 |
2 - v2 error format |
| 207 |
|
| 208 |
Returns: |
| 209 |
An object of the form: |
| 210 |
|
| 211 |
{ # Response message for ListCalculatedMetrics RPC. |
| 212 |
"calculatedMetrics": [ # List of CalculatedMetrics. |
| 213 |
{ # A definition for a calculated metric. |
| 214 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 215 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 216 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 217 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 218 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 219 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 220 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 221 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 222 |
"A String", |
| 223 |
], |
| 224 |
}, |
| 225 |
], |
| 226 |
"nextPageToken": "A String", # A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. |
| 227 |
}</pre> |
| 228 |
</div> |
| 229 |
|
| 230 |
<div class="method"> |
| 231 |
<code class="details" id="list_next">list_next()</code> |
| 232 |
<pre>Retrieves the next page of results. |
| 233 |
|
| 234 |
Args: |
| 235 |
previous_request: The request for the previous page. (required) |
| 236 |
previous_response: The response from the request for the previous page. (required) |
| 237 |
|
| 238 |
Returns: |
| 239 |
A request object that you can call 'execute()' on to request the next |
| 240 |
page. Returns None if there are no more items in the collection. |
| 241 |
</pre> |
| 242 |
</div> |
| 243 |
|
| 244 |
<div class="method"> |
| 245 |
<code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
| 246 |
<pre>Updates a CalculatedMetric on a property. |
| 247 |
|
| 248 |
Args: |
| 249 |
name: string, Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' (required) |
| 250 |
body: object, The request body. |
| 251 |
The object takes the form of: |
| 252 |
|
| 253 |
{ # A definition for a calculated metric. |
| 254 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 255 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 256 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 257 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 258 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 259 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 260 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 261 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 262 |
"A String", |
| 263 |
], |
| 264 |
} |
| 265 |
|
| 266 |
updateMask: string, Required. The list of fields to be updated. Omitted fields will not be updated. To replace the entire entity, use one path with the string "*" to match all fields. |
| 267 |
x__xgafv: string, V1 error format. |
| 268 |
Allowed values |
| 269 |
1 - v1 error format |
| 270 |
2 - v2 error format |
| 271 |
|
| 272 |
Returns: |
| 273 |
An object of the form: |
| 274 |
|
| 275 |
{ # A definition for a calculated metric. |
| 276 |
"calculatedMetricId": "A String", # Output only. The ID to use for the calculated metric. In the UI, this is referred to as the "API name." The calculated_metric_id is used when referencing this calculated metric from external APIs. For example, "calcMetric:{calculated_metric_id}". |
| 277 |
"description": "A String", # Optional. Description for this calculated metric. Max length of 4096 characters. |
| 278 |
"displayName": "A String", # Required. Display name for this calculated metric as shown in the Google Analytics UI. Max length 82 characters. |
| 279 |
"formula": "A String", # Required. The calculated metric's definition. Maximum number of unique referenced custom metrics is 5. Formulas supports the following operations: + (addition), - (subtraction), - (negative), * (multiplication), / (division), () (parenthesis). Any valid real numbers are acceptable that fit in a Long (64bit integer) or a Double (64 bit floating point number). Example formula: "( customEvent:parameter_name + cartPurchaseQuantity ) / 2.0" |
| 280 |
"invalidMetricReference": True or False, # Output only. If true, this calculated metric has a invalid metric reference. Anything using a calculated metric with invalid_metric_reference set to true may fail, produce warnings, or produce unexpected results. |
| 281 |
"metricUnit": "A String", # Required. The type for the calculated metric's value. |
| 282 |
"name": "A String", # Identifier. Resource name for this CalculatedMetric. Format: 'properties/{property_id}/calculatedMetrics/{calculated_metric_id}' |
| 283 |
"restrictedMetricType": [ # Output only. Types of restricted data that this metric contains. |
| 284 |
"A String", |
| 285 |
], |
| 286 |
}</pre> |
| 287 |
</div> |
| 288 |
|
| 289 |
</body></html> |