Data Collection API
Contents of this page |
---|
GET /tracking/list
Description
List pixels
Endpoint
/tracking/list
Method
GET
Parameters
None
Response
{ "response":{ "status":"OK", "beacons":[ { "id":"1", "name":"My pixel", "settings":null, "hasRules":false, "type":"smart_pixel" }, {...} ] } }
POST /tracking/beacon
Description
Add pixel
Endpoint
/tracking/beacon
Method
POST
Parameters
Name | Type | Required | Description | Example |
---|---|---|---|---|
name | string | Y | The name | My pixel |
type | string | Y | Possible options: click, pixel, impression, interaction, smart_pixel | smart_pixel |
settings | string | N | JSON settings | {"labels":["label #1","label #2","label #3"]} |
rules | string | N | JSON rules | [{ "name": "segment #1", "configuration": [{ "field": "url", "value": ["Mapp"], "comparator": "contains", "or": [{ "field": "url", "value": "FLXone", "comparator": "contains" }] }], "options": { "name": "test segment", "type": "segment" } }] |
Response
{ "response":{ "status":"OK", "published":true, "beacon":{ "id":"2", "name":"My second pixel" } } }
DELETE /tracking/beacon
Description
Delete pixel
Endpoint
/tracking/beacon
Method
DELETE
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | int | Y | The pixel id |
GET /tracking/beacon-code
Description
Get the beacon code of a pixel for a specific platform
Endpoint
/tracking/beacon-code
Method
GET
Parameters
Name | Type | Required | Description | Example |
---|---|---|---|---|
id | int | Y | The pixel id | 1234 |
platform | string | N | The platform for which to get the beacon code | appnexus |
Response
{ "response": { "status": "OK", "code": "<script>(function(e){var t=document,n=t.createElement(\"script\");n.async=!0,n.defer=!0,n.src=e,t.getElementsByTagName(\"head\")[0].appendChild(n)})(\"\/\/c.flx1.com\/11-1234.js?id=1234&m=11\")<\/script>", "code_secure": "<script>(function(e){var t=document,n=t.createElement(\"script\");n.async=!0,n.defer=!0,n.src=e,t.getElementsByTagName(\"head\")[0].appendChild(n)})(\"\/\/c.flx1.com\/11-1234.js?id=1234&m=11\")<\/script>", "code_conversion": "<script>(function(e){var t=document,n=t.createElement(\"script\");n.async=!0,n.defer=!0,n.src=e,t.getElementsByTagName(\"head\")[0].appendChild(n)})(\"https:\/\/go.flx1.com\/ia?id=1234&m=11&it=10\")<\/script>", "code_click": "https:\/\/go.flx1.com\/click?id=11264&m=11&pl=2&idmd5=${DEVICE_MD5}&idsha1=${DEVICE_SHA1}&euid=${USER_ID}&csiz=${CREATIVE_SIZE}&sitid=${SITE_ID}&pubid=${PUBLISHER_ID}&cpid=${CP_ID}&liid=${CPG_ID}&plid=${TAG_ID}&advid=${ADV_ID}&bid=${BID_PRICE}&bidclr=${PRICE_PAID}&aid=${AUCTION_ID}&cid=${CREATIVE_ID}&eurl=${REFERER_URL_ENC}&out=", "code_impression": "https:\/\/go.flx1.com\/imp?id=11264&m=11&pl=2&idmd5=${DEVICE_MD5}&idsha1=${DEVICE_SHA1}&euid=${USER_ID}&csiz=${CREATIVE_SIZE}&sitid=${SITE_ID}&pubid=${PUBLISHER_ID}&cpid=${CP_ID}&liid=${CPG_ID}&plid=${TAG_ID}&advid=${ADV_ID}&bid=${BID_PRICE}&bidclr=${PRICE_PAID}&aid=${AUCTION_ID}&cid=${CREATIVE_ID}&ecp=${ECP}&flp=${RESERVE_PRICE}&eurl=${REFERER_URL_ENC}&flt=2", "secure_seperate": false, "code_entities": "<script>(function(e){var t=document,n=t.createElement("script");n.async=!0,n.defer=!0,n.src=e,t.getElementsByTagName("head")[0].appendChild(n)})("\/\/c.flx1.com\/11-1234.js?id=11264&m=11")<\/script>", "howto": "Place this JavaScript on your website", "name": "Name of the Pixel", "type": "smart_pixel", "custom_data": [] } }
In the response the keys code and code_secure contain the HTML for the onsite tracking. The boolean value secure_seperate indicates if there is a difference between the two codes. If there is no difference the values is false. The key code_conversion contains the conversion code of this pixel. The key code_click contains the click tracker macro for this pixel. The key code_impression contains the impression tracker macro for this pixel.