EaserixDocs
DevelopersAPI referenceLinksAnalytics

Campaign detail with click series and breakdowns

One campaign's total clicks and link count in the window, plus the same daily series and breakdowns shape as getLink/analyticsSummary. Readable — and reportable — even when the campaign is archived.

View as Markdown
GET
/v1/analytics/campaigns/{id}
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Query Parameters

days?integer

Analytics window in days; 0 means all-time (no cutoff); other values fall back to 14. 365 is the dashboard's own window — wide enough for its Month/Week tabs and to always have at least one full prior year for the Year tab, since bucketing a shorter window by month/year can collapse to a single bucket with nothing to draw a line between.

Default14

Value in

  • 0
  • 7
  • 14
  • 30
  • 90
  • 365
seriesDays?integer

Windows just the day-series independently of days (which still scopes totalClicks/linkCount/breakdowns) — lets a caller get all-time totals and a shorter windowed series in one request. Omit to scope the series by days too, as when this parameter didn't exist.

Value in

  • 0
  • 7
  • 14
  • 30
  • 90
  • 365

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/analytics/campaigns/string"
{  "campaign": {    "id": "string",    "name": "string",    "utmSource": "string",    "utmMedium": "string",    "utmCampaign": "string",    "utmTerm": "string",    "utmContent": "string",    "archived": true,    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "totalClicks": 0,  "linkCount": 0,  "asOf": "2019-08-24T14:15:22Z",  "series": [    {      "date": "string",      "clicks": 0,      "activeLinks": 0    }  ],  "breakdowns": {    "byCountry": [      {        "key": "string",        "clicks": 0      }    ],    "byDevice": [      {        "key": "string",        "clicks": 0      }    ],    "byBrowser": [      {        "key": "string",        "clicks": 0      }    ],    "byReferrer": [      {        "key": "string",        "clicks": 0      }    ],    "byVariant": [      {        "key": "string",        "clicks": 0      }    ]  },  "days": 0}