Campaigns
Our API allows you to retrieve targeted campaign data and collect analytics data for your campaigns.
Overview
These requests allow you to get campaign data based on targeting parameters and gain insights into your campaign performance with a single HTTPS request.
You can retrieve active campaigns through these APIs using set parameters (for example: language and campaign medium) in order to find matching campaigns for evaluation. Additionally, you can track campaign event data for analytics purposes and monitor how your campaigns are performing.
Get Campaign Data
You can retrieve campaign data of active campaigns based on the parameters provided using the v4/campaign/evaluate
endpoint.
Evaluates active campaigns for given targeting parameters and returns campaign data, if there is a matching campaign.
email
- Emailweb
- Webreturns
- Returns Portal
GET /v4/campaign/evaluate/ HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"campaignId": null,
"trackingId": null,
"customerSegmentationId": null,
"audienceId": null,
"openTrackingUrl": "text",
"analyticsBaseUrl": "text",
"values": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"placeholders": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"typedValues": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"accountHasActiveCampaigns": null
}
Get Campaign Analytics
You can retrieve analytics data for campaign events using the v4/campaign/redirect
endpoint.
Collects campaign event data (clicks & opens) for analytics purposes and forwards the user to the redirect URL if provided.
open
- openclick
- click
email
- Emailweb
- Webreturns
- Returns Portal
GET /v4/campaign/redirect/?eventType=open HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"campaignId": null,
"trackingId": null,
"customerSegmentationId": null,
"audienceId": null,
"openTrackingUrl": "text",
"analyticsBaseUrl": "text",
"values": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"placeholders": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"typedValues": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"accountHasActiveCampaigns": null
}
Was this helpful?