Automations

Get automation link metrics

Changed on

Returns metrics for link clicks within an automation, both in total and in series periods (days, weeks, etc). series metrics are ordered oldest to newest (i.e. the 0-index for any result is the oldest step/period).

You cannot request fewer than 2 steps of any period (2 hours, 2 days, 2 weeks, or 2 months). For instance, ?period=days&steps=1 means two days - the 48 hours before the API request was made. ?period=days&steps=0 returns the same as the maximum of the period - ?period=days&steps=45. See the steps parameter below for the maximum count of each period.

get/v1/campaigns/{campaign_id}/metrics/links

Request

  • Base URL
    https://api.customer.io
  • URL
    https://api.customer.io/v1/campaigns/{campaign_id}/metrics/links
  • Auth
    HTTP bearer

Response

Returns an array of link objects. Each object represents a different link in your automation and contains independent metrics.

Example response

{
  "links": [
    {
      "link": {
        "id": 1234,
        "href": "https://docs.customer.io"
      },
      "metric": {
        "series": {
          "clicked": [
            1,
            3,
            5,
            7
          ],
          "human_clicked": [
            1,
            2,
            3,
            4
          ],
          "machine_clicked": [
            0,
            1,
            1,
            2
          ]
        }
      }
    }
  ]
}

Changes