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

NameTypeRequiredDescriptionExample
namestringYThe nameMy pixel
typestringYPossible options:
click, pixel, impression, interaction, smart_pixel 
smart_pixel
settingsstringNJSON settings
{"labels":["label #1","label #2","label #3"]}
rulesstringNJSON 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

NameTypeRequiredDescription
idintYThe 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

NameTypeRequiredDescriptionExample
idintYThe pixel id1234
platformstringNThe platform for which to get the beacon codeappnexus

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": "&lt;script&gt;(function(e){var t=document,n=t.createElement(&quot;script&quot;);n.async=!0,n.defer=!0,n.src=e,t.getElementsByTagName(&quot;head&quot;)[0].appendChild(n)})(&quot;\/\/c.flx1.com\/11-1234.js?id=11264&amp;m=11&quot;)&lt;\/script&gt;",
		"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.