analytics.management.custom Metrics.insert
POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/customMetrics?alt=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>"aUser=<string>&userIp=<string>
Create a new custom metric.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
alt | string | Data format for the response. | |
fields | string | Selector specifying which fields to include in a partial response. | |
key | string | API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. | |
oauth_token | string | OAuth 2.0 token for the current user. | |
prettyPrint | string | Returns response with indentations and line breaks. | |
quotaUser | string | An opaque string that represents a user for quota purposes. Must not exceed 40 characters. | |
userIp | string | Deprecated. Please use quotaUser instead. |
Request Body
{"accountId"=>"<string>", "active"=>"<boolean>", "id"=>"<string>", "max_value"=>"<string>", "min_value"=>"<string>", "name"=>"<string>", "parentLink"=>{"href"=>"<string>", "type"=>"analytics#webproperty"}, "scope"=>"<string>", "type"=>"<string>", "webPropertyId"=>"<string>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"accountId":"\u003cstring\u003e","active":"\u003cboolean\u003e","created":"1957-12-12T23:34:50.176Z","id":"\u003cstring\u003e","index":-27884243,"kind":"analytics#customMetric","max_value":"\u003cstring\u003e","min_value":"\u003cstring\u003e","name":"\u003cstring\u003e","parentLink":{"href":"\u003cstring\u003e","type":"analytics#webproperty"},"scope":"\u003cstring\u003e","selfLink":"laborum labore enim ex amet","type":"\u003cstring\u003e","updated":"1975-09-12T02:47:05.399Z","webPropertyId":"\u003cstring\u003e"}