Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.

Custom Metrics

For a list of methods for this resource, see the end of this page.

Resource representations

JSON template for Analytics Custom Metric.

{
  "kind": "analytics#customMetric",
  "id": string,
  "accountId": string,
  "webPropertyId": string,
  "name": string,
  "index": integer,
  "scope": string,
  "active": boolean,
  "type": string,
  "min_value": string,
  "max_value": string,
  "created": datetime,
  "updated": datetime,
  "selfLink": string,
  "parentLink": {
    "type": "analytics#webproperty",
    "href": string
  }
}
Property name Value Description Notes
accountId string Account ID.
active boolean Boolean indicating whether the custom metric is active.
created datetime Time the custom metric was created.
id string Custom metric ID.
index integer Index of the custom metric.
kind string Kind value for a custom metric. Set to "analytics#customMetric". It is a read-only field.
max_value string Max value of custom metric.
min_value string Min value of custom metric.
name string Name of the custom metric.
parentLink.href string Link to the property to which the custom metric belongs.
parentLink.type string Type of the parent link. Set to "analytics#webproperty".
scope string Scope of the custom metric: HIT or PRODUCT.
type string Data type of custom metric.
updated datetime Time the custom metric was last modified.
webPropertyId string Property ID.

Methods

get
Get a custom metric to which the user has access.
insert
Create a new custom metric.
list
Lists custom metrics to which the user has access.
patch
Updates an existing custom metric. This method supports patch semantics.
update
Updates an existing custom metric.