Analytics Metrics API

The Analytics 2.0 Metrics API endpoints allow you to retrieve metrics programmatically through Adobe Developer. The endpoints use the same data and methods that are used when working with metrics in the UI. See Metrics in the Analytics Components guide for more information. For information on using the Calculated Metrics API (a separate service), see the Calculated Metrics API endpoint guide.

The endpoints described in this guide are routed through analytics.adobe.io. To use them, you will need to first create a client with access to the Adobe Analytics Reporting API. For more information, refer to Getting started with the Analytics API.

You can find your global company ID by using the Discovery API.

data-variant=info
data-slots=text
Adobe may add optional request and response members (name/value pairs) to existing API objects at any time and without notice or changes in versioning. Adobe recommends that you refer to the API documentation of any third-party tool you integrate with our APIs so that such additions are ignored in processing if not understood. If implemented properly, such additions are non-breaking changes for your implementation. Adobe will not remove parameters or add required parameters without first providing standard notification through release notes.

This guide includes instructions for using the following endpoints:

GET multiple metrics

Use this endpoint to return a list of metrics for a given report suite ID.

GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/metrics?rsid={RSID}

Request and response examples

Click the Request tab in the following example to see a cURL request for this endpoint. Click the Response tab to see a successful JSON response for the request.

data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON

Request

curl -X GET "https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/metrics?rsid=examplersid&locale=en_US&segmentable=true&expansion=allowedForReporting" \
" \
    -H "x-api-key: {CLIENT_ID}" \
    -H "Authorization: Bearer {ACCESS_TOKEN}"

Response

[
  {
    "id": "metrics/campaigninstances",
    "title": "Campaign Click-throughs",
    "name": "Campaign Click-throughs",
    "type": "int",
    "category": "Traffic Sources",
    "support": [
      "oberon",
      "dataWarehouse"
    ],
    "allocation": true,
    "precision": 0,
    "calculated": false,
    "segmentable": true,
    "supportsDataGovernance": false,
    "polarity": "positive",
    "allowedForReporting": true,
    "standardComponent": true
  },
  {
    "id": "metrics/cartadditions",
    "title": "Cart Additions",
    "name": "Cart Additions",
    "type": "int",
    "category": "Conversion",
    "support": [
      "oberon",
      "dataWarehouse"
    ],
    "allocation": true,
    "precision": 0,
    "calculated": false,
    "segmentable": true,
    "supportsDataGovernance": true,
    "description": "The number of times a visitor added something to their cart. This can help you understand at what part of the conversion funnel that customers show enough interest in a product to add it to their cart.",
    "polarity": "positive",
    "allowedForReporting": true,
    "standardComponent": true
  },
]

Request example details

The above example requests the following details:

Response example details

The above JSON response example shows the following details:

Request parameters

The GET multiple metrics endpoint includes the following request query parameters:

Parameter
Req/Opt
Type
Description
rsid
required
string
Report suite ID
locale
optional
string
Specified language
segmentable
optional
boolean
Whether to include only metrics that are valid within a segment
reportable
optional
boolean
Whether to include only metrics that are valid within the report
expansion
optional
array (string)
A comma-delimited list of additional metadata to items, including tags, allowedForReporting, and categories

Response parameters

The GET multiple metrics endpoint includes the following response parameters:

Parameter
Type
Description
id
string
Metric ID
title
string
Metric title
name
string
Metric name
type
array of enums
Lists the data type of the metric
extraTitleInfo
string
Additional title info
category
string
Product category
support
string
Support information
allocation
boolean
Allocation information
precision
$int32
Support information
calculated
boolean
Whether it is a calculated metric
polarity
string
Whether the polarity is positive or negative
helplink
string
URL that provides documentation resources
tags
object
An extra metadata item in response to the expansion request parameter. This can include the tag ID, tag name, tag description, and a list of components associated the tag.
allowedForReporting
boolean
An extra metadata item in response to the expansion request parameter. Indicates whether the metric is set to be allowed for reporting.
categories
string
Product categories. An extra metadata item in response to the expansion request parameter.
pathable
boolean
Whether the metric in the report is pathing enabled
parent
string
Parent metric
segmentable
boolean
Whether the metric is segmentable
reportable
array (string)
Whether the metric is segmentable
description
string
Contents of metric description field in report
noneSettings
boolean
Whether "none" item report setting is set

GET a single metric

Use this endpoint to retrieve information for a single metric in a report suite.

GET https://analytics.adobe.io/api/{GLOBAL_COMPANY_ID}/metrics/{Metric_ID}?rsid={report suite ID}

Request and response examples

Click the Request tab in the following example to see a cURL request. Click the Response tab to see a successful JSON response for the request.

data-slots=heading, code
data-repeat=2
data-languages=CURL,JSON

Request

curl -X GET "https://analytics.adobe.io/api/{globalCompanyId/metrics/carts?rsid=examplersid&locale=en_US&expansion=categories" \
    -H "x-api-key: {CLIENT_ID}" \
    -H "Authorization: Bearer {ACCESS_TOKEN}"

Response

{
  "id": "metrics/carts",
  "title": "Carts",
  "name": "Carts",
  "type": "int",
  "category": "Conversion",
  "categories": [],
  "support": [
    "oberon",
    "dataWarehouse"
  ],
  "allocation": true,
  "precision": 0,
  "calculated": false,
  "segmentable": true,
  "supportsDataGovernance": true,
  "description": "The number of times visitors to the site added items to their online shopping carts.",
  "polarity": "positive",
  "standardComponent": true
}

Request example details

In the above example, the GET metrics ID request specifies the metric ID as carts and the rsid as examplersid. It includes the query parameters locale as en_US, and the expansion parameter categories as true.

The above example requests the following details:

Response example details

The above JSON response example shows the following details:

For more information on the Metrics API endpoints, see the Adobe Analytics 2.0 API Reference.

Request parameters

The GET a single metric endpoint includes the following request query parameters:

Parameter
Req/Opt
Type
Description
id
required
string
Metric ID (e.g.evar1)
rsid
required
string
Report suite ID
locale
optional
string
Specified language
expansion
optional
array (string)
A comma-delimited list of additional metadata to items, including tags, allowedForReporting, and categories

Response parameters

The GET a single metric endpoint includes the same response parameters as the GET multiple metrics response parameters, as described above.