Endpointget /v2/event/{event_key} /{event_token}
URI Parameters
You can log an event by calling the event endpoint appended with an event key and token.
event_key string, required |
Find a list of event keys in your AdFlight portal. Common event keys are impressions, clicks and conversions. You can create up to 100 custom events. |
event_token object, required |
The event_token that you got from the ad response. It's located inside the ads object. |
Token Invalidation
The tokens you're using to log events are user specific and can be invalidated for several reasons:
- The same token was fired more than once in the last 24 hours.
- The token was fired >24 hours after the original ad request was made.
|
Example Request
{
"ads": {
"div1": [{
"advertiser_id": 645091658,
"campaign_id": 811263544,
"channel_id": 488223173,
"creative_id": 770775699,
"data": [0],
"event_token": "eyJybmQiOiIxNjYxMDIzMTczLjkzNzM1NDQ5NDIiLCJjaGFubmVsX2lkIjo0ODgyMjMxNzMsInpvbmVfaWQiOjUzNzQ3Nzk4NCwiYWR2ZXJ0aXNlcl9pZCI6NjQ1MDkxNjU4LCJjYW1wYWlnbl9pZCI6ODExMjYzNTQ0LCJjcmVhdGl2ZV9pZCI6NzcwNzc1Njk5fQ",
"zone_id": 537477984 }],
"div2": [{
"advertiser_id": 166409558,
"campaign_id": 263811544,
"channel_id": 882243173,
"creative_id": 077775699,
"data": [0],
"event_token": "bmQiOiIxNjYeyJyxMDIzMTczLjkzNzM1NDQ5NDIiLCJjaGFubmVsX2lkIjo0ODgyMjMxNzMsInpvbmVfaWQiOjUzNzQ3Nzk4NCwiYWR2ZXJ0aXNlcl9pZCI6NjQ1MDkxNjU4LCJjYW1wYWlnbl9pZCI6ODExMjYzNTQ0LCJjcmVhdGl2ZV9pZCI6NzcwNzc1Njk5fQ",
"zone_id": 798453747 }] }
|
format_quoteThese plug & play ad serving APIs have cut down developement cost tremendously. Absolutely a huge time saver for anyone who wants to build a custom ad server in a short time.
Hayden Elson
starstarstarstarstar
Developer at Galactic Media