Pontiac Wiki Pontiac Wiki

Remarketing Campaign Tutorial

Remarketing Campaign Tutorial

  • Tutorial Overview
  • Authentication
  • Creating a New Advertiser
  • Uploading a Creative
  • Posting Pixels
  • Posting a Line Item
  • Placing Pixels
  1. Home
  2. API Documentation
  3. Remarketing Campaign Tutorial

Tutorial Overview

In the following example we will set up a line for remarketing that targets the whole US. At the end of the tutorial all you would need to do is place the segment pixels (html) on your home page and the conversion pixels (also html) on your checkout page. A full script is provided in python. If you were to run this with a funded Pontiac account and place the pixels correctly you would have a live remarketing campaign.

  • Authentication
  • Creating a New Advertiser
  • Uploading a Creative
  • Posting Pixels
  • Posting a Line Item
  • Placing Pixels

Authentication

For this we will send a simple post request via curl.


curl -X POST https://api.pontiac.media/auth -d ‘{“auth”:{“userName”:”user1″, “password”:”myPassword”}}’
Response:



 
The token received in the field authToken is to be passed in on all subsequent requests as a header called “auth”.
 
For example, the following is a get request for an existing advertiser:
curl -X GET -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjI3MDIsInVzZXJJZCI6MzU1LCJleHBpcmVzIjoiMjAyMC0wOC0SDsawMjo1NToyNyJ9.d6gUDLA_Yx_Em5REoathACFMPcfv1TgL8B87P19q7yA’  ‘https://api.pontiac.media/pontiac/advertiser?advertiser-id=1234’
 
Response:
 


Creating a New Advertiser

Post a new advertiser with the minimum required properties. In this case we are only passing in the name of the advertiser and its state.
curl -X POST -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjI3MDIsInVzZXJJZCI6MzU1LCJleHBpcmVzIjoiMjAyMC0wOC0SDsawMjo1NToyNyJ9.d6gUDLA_Yx_Em5REoathACFMPcfv1TgL8B87P19q7yA’  ‘https://api.pontiac.media/pontiac/advertiser’ -d ‘{
   “name”:”newAdvertiser”,
   “status”:0
}’
 
Response:
{
   “timestamp”:”Mon Aug 17 20:56:19 UTC 2020″,
   “response”:{
   “Advertisers”:[
      {
         “pontiacAdvertiserId”:1713,
         “name”:”newAdvertiser”,
         “status”:0,
         “seatId”:1000,
         “insertionOrdersEnabled”:1,
         “gdprEnabled”:0,
         “politicalContentEnabled”:0,
         “hasProfile”:0,
         “gamblingEnabled”:0
      }
   ]
   },
   “accountStatus”:1,
   “seatId”:1000
}
 
From this you will need the pontiacAdvertiserId, in this case 1713. It will be used when creating the Line and the Creatives.
 

Uploading a Creative

Here we are posing a small 11 kb image.
This image must be serialized using base64 encoding and passed into the field encodedRawCreative.
To encode an image you can use https://www.base64-image.de/ or find a library for the language you are using to do it programmatically. There is an example in the python code that accompanies this tutorial
For this call you will see that you need to pass in the Advertiser ID when posting the Creative.
curl -X POST -H ‘auth:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjUgMDI6Mjc6MTYifQ.JpVp62T-VEbuxquTXHXaKqhrqEIef1Hq3PpaRgExzrg’ -d ‘{
“name”:”testSmallCreative”,
         “pontiacAdvertiserId”:1713,
         “creativeProperties”:{
            “clickURL”:”http://pontiac.media”,
“encodedRawCreative”:”/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDADIiJSwlHzIsKSw4NTI7S31RS0VFS5ltc1p9tZ++u7Kfr6zI4f/zyNT/16yv+v/9////////wfD/////////////2wBDATU4OEtCS5NRUZP/zq/O////////////////////////////////////////////////////////////////////wAARCAD6ASwDAREAAhEBAxEB/8QAGQABAQEBAQEAAAAAAAAAAAAAAAECAwQF/8QANxABAAIBAwMDAwMDAwMDBQAAAQI…
…JitQd8lVHIJtT57YEcKOBHAmAfvgPvgMCGFXAGRY0YIpkqxoxVjRkajZirGjJWo2ZKrcciV0MsRowjWCmEocnzlSqcn/APTlSsvB8OWJWX/bLGaw85qM1l4yxmsOEqPGEZcDDgjLzgR74WI4rUHIsRyERwI4UwRHAhyYB5cUMBgf/9k=”,
“width”:300,
“height”:250
},
“status”:1,
“creativeType”:”image”
}’ ‘https://api.pontiac.media/pontiac/creative?advertiser-id=1713’
(see full encoded Creative here: Encoded Creative)
 
Response with the wrapper and read only fields:
{“timestamp”:”Mon Aug 24 19:03:28 UTC 2020″,”response”:{“Creatives”:[{“pontiacCreativeId”:28214,”seatId”:1000,”name”:”testSmallCreative”,”pontiacAdvertiserId”:1713,”creativeProperties”:{“clickURL”:”http://pontiac.media”,”thirdPartyPixelsIds”:[],”encodedRawCreative”:”/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDADIiJSwlHzIsKSw4NTI7S31RS0VFS5ltc1p9tZ++u7Kfr6zI4f/zyNT/16yv+v/9////////wfD/////////////2wBDATU4OEtCS5NRUZP/zq/O////////////////////////////////////////////////////////////////////wAARCAD6ASwD…
…wI4UwRHAhyYB5cUMBgf/9k=”,”width”:300,”height”:250,”segmentPixelIds”:[]},”status”:1,”auditData”:{“status”:”pending”},”creativeType”:”image”,”clickTracking”:0,”soonToExpire”:0,”isSensitive”:0,”categories”:[],”isMalicious”:0,”isUnusable”:0}]},”accountStatus”:1,”seatId”:1000}

(see full Response here: Response)
 
From this we will need the pontiacCreativeId. We will pass this in when making the Line, in this example it is 28214.
 

Posting Pixels

Pixels are used for tracking success as well as building an audience. The code to fire pixels has to be placed directly on your page. The segment pixel will go on your landing page and the conversion pixel will go on your checkout page (or whatever page is used to track the success of your campaign).
When creating pixels there are 2 steps. They first have to be made via a post request. Once that happens there is a delay until the “exchangeId” is assigned to the pixel. Because of this you must submit a get request later to retrieve the exchangeId to actually place the pixels.
 

Posting a Conversion Pixel

 
curl -X POST -H ‘auth:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjUgMDI6Mjc6MTYifQ.JpVp62T-VEbuxquTXHXaKqhrqEIef1Hq3PpaRgExzrg’ -d ‘{
“name”:”testConversionPixel”,
“pontiacAdvertiserId”:1713,
“status”:1
}’ ‘https://api.pontiac.media/pontiac/conversion-pixel’
 
Response:
{“timestamp”:”Mon Aug 24 19:56:19 UTC 2020″,”response”:{“ConversionPixel”:{“pontiacPixelId”:980,”seatId”:1000,”name”:”testConversionPixel”,”pontiacAdvertiserId”:1713,”triggerType”:”hybrid”,”status”:1,”orderIdMacro”:0,”valueMacro”:0,”postViewExpireDays”:30,”postClickExpireDays”:30,”minMinutesPerConv”:10}},”accountStatus”:1,”seatId”:1000}
 
From this we will need the pontiacPixelId. We will pass this in when making the Line, in this example it is 980.
 

Posting a Segment Pixel

 
curl -X POST -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjYgMDE6Mzk6MDkifQ.W475vyhEafa9TN94OaLkUEHWF7YkI6t-tJbKBIYqN6A’ -d ‘{
“name”:”testSegmemtPixel”,
“pontiacAdvertiserId”:1713
}’ ‘https://api.pontiac.media/pontiac/segment’
 
Response:
{“timestamp”:”Tue Aug 25 17:39:44 UTC 2020″,”response”:{“SegmentPixel”:{“pontiacSegmentId”:22672,”seatId”:1000,”name”:”testSegmemtPixel”,”pontiacAdvertiserId”:1713,”cost”:0.0,”segmentPixelType”:”firstParty”}},”accountStatus”:1,”seatId”:1000}
 
From this we will need the pontiacSegmentId. We will pass this in when making the Line, in this example it is 22672.

Posting a Line Item

At this point we have the Advertiser ID, Creative ID, Conversion Pixel ID and the Segment Pixel ID. We will post a simple, mostly default Line targeting a couple of zip codes and a couple of select sellers.
 
Advertiser ID 1713
Creative ID 28214
Conversion Pixel ID 980
Segment Pixel ID 22672
 
 curl -X POST -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjYgMDE6Mzk6MDkifQ.W475vyhEafa9TN94OaLkUEHWF7YkI6t-tJbKBIYqN6A’ -d ‘ {
   “pontiacAdvertiserId”:1713,
   “deployDate”:20200825,
   “status”:0,
   “startDate”:20200825,
   “endDate”:20200829,
   “totalBudgetSpend”:10.0,
   “dailyBudgetSpend”:2.2,
   “budgetType”:”spend”,
   “goalType”:”ctr”,
   “name”:”exampleLine2.1″,
   “budgetMultiplier”:1.1,
   “allowDynBudgetMultiplier”:0,
   “optSchedule”:{
   “days”:[
      “thursday”
   ]
   },
   “bidData”:{
   “range”:{
      “max”:3.75,
      “min”:0.26
   },
   “base”:2.31
   },
   “conversionPixelsIds”:[
   980
   ],
   “segmentGroups”:[
   {
      “segments”:[
         {
            “id”:22672,
            “segmentType”:”firstParty”,
            “action”:”include”,
            “status”:1
         }
      ],
“isCustomDomainGroup”:false
   }
   ],
   “creativesIds”:[
   28214
   ],
   “targets”:{
   “geoTargets”:{
      “action”:”include”,
      “geos”:[
         {
            “name”:”United States”,
            “code”:”US”,
            “id”:233,
            “type”:”country”
         },
         {
            “countryCode”:”US”,
            “code”:”11215″,
            “type”:”zip”
         },
         {
            “countryCode”:”US”,
            “code”:”11238″,
            “type”:”zip”
         },
         {
            “countryCode”:”US”,
            “code”:”07481″,
            “type”:”zip”
         },
         {
            “countryCode”:”US”,
            “code”:”07410″,
            “type”:”zip”
         }
      ]
   },
   “dayPartTargets”:{
      “dayParts”:[
         {
            “day”:”sunday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”monday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”tuesday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”wednesday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”thursday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”friday”,
            “startHour”:6,
            “endHour”:23
         },
         {
            “day”:”saturday”,
            “startHour”:6,
            “endHour”:23
         }
      ]
   },
   “inventoryTypeTargets”:{
      “types”:[
         “web”,
         “mobileWeb”
      ]
   },
   “osTargets”:{
      “action”:”include”,
      “systems”:[
        {
            “name”:”Android”,
            “id”:2
         },
         {
            “name”:”Apple iOS”,
            “id”:3
         },
         {
            “name”:”Apple Mac”,
            “id”:4
         },
        {
            “name”:”Microsoft Windows”,
            “id”:5
         }
      ]
   },
   “exchangeTargets”:{
      “action”:”include”,
      “exchanges”:[
         {
            “id”:2,
            “name”:”Pubmatic”,
            “category”:”Exchange”,
            “sensitive”:0
         },
         {
            “id”:8,
            “name”:”OpenX”,
            “category”:”Exchange”,
            “sensitive”:1
        },
         {
            “id”:9,
            “name”:”Rubicon”,
            “category”:”Exchange”,
            “sensitive”:0
         },
         {
            “id”:10,
            “name”:”AppNexus (Tier 3) Open”,
            “category”:”Network”,
            “sensitive”:0
         },
         {
            “id”:11,
            “name”:”AppNexus (Tier 2) Premier”,
            “category”:”Network”,
            “sensitive”:1
         },
        {
            “id”:12,
            “name”:”AppNexus (Tier 2) Open”,
            “category”:”Network”,
            “sensitive”:0
         }
      ]
   }
   },
   “frequency”:{
   “maxLifetimeImpressions”:12,
   “maxDailyImpressions”:4,
   “allowDyn”:1
   },
   “creativeSuperType”:”standard”
}’  ‘https://api.pontiac.media/pontiac/line’
 
{“timestamp”:”Tue Aug 25 18:33:36 UTC 2020″,”response”:{“Lines”:[{“pontiacLineId”:6802,”pontiacAdvertiserId”:1713,”deployDate”:20200825,”status”:0,”seatId”:1000,”startDate”:20200825,”endDate”:20200829,”totalBudgetSpend”:10.0,”dailyBudgetSpend”:2.2,”budgetType”:”spend”,”goalType”:”ctr”,”name”:”exampleLine2.1″,”budgetMultiplier”:1.1,”allowDynBudgetMultiplier”:0,”optSchedule”:{“days”:[“thursday”]},”bidData”:{“range”:{“max”:3.75,”min”:0.26},”base”:2.31},”conversionPixelsIds”:[980],”segmentGroups”:[{“segments”:[{“id”:22672,”segmentType”:”firstParty”,”action”:”include”,”status”:1}],”isCustomDomainGroup”:0}],”creativesIds”:[28214],”targets”:{“geoTargets”:{“action”:”include”,”geos”:[{“name”:”United States”,”code”:”US”,”id”:233,”type”:”country”},{“countryCode”:”US”,”code”:”11215″,”type”:”zip”},{“countryCode”:”US”,”code”:”11238″,”type”:”zip”},{“countryCode”:”US”,”code”:”07481″,”type”:”zip”},{“countryCode”:”US”,”code”:”07410″,”type”:”zip”}]},”dayPartTargets”:{“dayParts”:[{“day”:”sunday”,”startHour”:6,”endHour”:23},{“day”:”monday”,”startHour”:6,”endHour”:23},{“day”:”tuesday”,”startHour”:6,”endHour”:23},{“day”:”wednesday”,”startHour”:6,”endHour”:23},{“day”:”thursday”,”startHour”:6,”endHour”:23},{“day”:”friday”,”startHour”:6,”endHour”:23},{“day”:”saturday”,”startHour”:6,”endHour”:23}]},”inventoryTypeTargets”:{“types”:[“web”,”mobileWeb”]},”osTargets”:{“action”:”include”,”systems”:[{“name”:”Android”,”id”:2},{“name”:”Apple iOS”,”id”:3},{“name”:”Apple Mac”,”id”:4},{“name”:”Microsoft Windows”,”id”:5}]},”exchangeTargets”:{“action”:”include”,”exchanges”:[{“id”:2,”name”:”Pubmatic”,”category”:”Exchange”,”sensitive”:0},{“id”:8,”name”:”OpenX”,”category”:”Exchange”,”sensitive”:1},{“id”:9,”name”:”Rubicon”,”category”:”Exchange”,”sensitive”:0},{“id”:10,”name”:”AppNexus (Tier 3) Open”,”category”:”Network”,”sensitive”:0},{“id”:11,”name”:”AppNexus (Tier 2) Premier”,”category”:”Network”,”sensitive”:1},{“id”:12,”name”:”AppNexus (Tier 2) Open”,”category”:”Network”,”sensitive”:0}]}},”frequency”:{“maxLifetimeImpressions”:12,”maxDailyImpressions”:4,”allowDyn”:1},”creativeSuperType”:”standard”,”budgetsAreFixed”:0,”lineSetupType”:”simple”,”segmentBooleanOperator”:”or”,”dailyPacing”:”even”,”isRemarketing”:0,”campaignType”:1,”sensitive”:0,”statusInfo”:[],”minMinutesPerImpEnabled”:0}]},”accountStatus”:1,”seatId”:1000}

Placing Pixels

Now that we have everything set up the last step is to get the 2 pixels (segment and conversion) and get their “exchangeId”.
 
Get Request for Segment Pixel
curl -X GET -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjYgMDE6Mzk6MDkifQ.W475vyhEafa9TN94OaLkUEHWF7YkI6t-tJbKBIYqN6A’  ‘https://api.pontiac.media/pontiac/segment?segment-id=22672’
Response:
{“timestamp”:”Tue Aug 25 17:43:57 UTC 2020″,”response”:{“SegmentPixel”:{“pontiacSegmentId”:22672,”exchangeId”:23462667,”seatId”:1000,”name”:”testSegmemtPixel”,”pontiacAdvertiserId”:1713,”cost”:0.0,”segmentPixelType”:”firstParty”}},”accountStatus”:1,”seatId”:1000}
From this we will need the exchangeId, in this example it is 23462667.
 
Get Request for Conversion Pixel
curl -X GET -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjYgMDE6Mzk6MDkifQ.W475vyhEafa9TN94OaLkUEHWF7YkI6t-tJbKBIYqN6A’  ‘https://api.pontiac.media/pontiac/conversion-pixel?pixel-id=980’
Response:
{“timestamp”:”Tue Aug 25 17:53:12 UTC 2020″,”response”:{“ConversionPixel”:{“pontiacPixelId”:980,”exchangeId”:1361577,”seatId”:1000,”name”:”testConversionPixel”,”pontiacAdvertiserId”:1713,”triggerType”:”hybrid”,”status”:1,”orderIdMacro”:0,”valueMacro”:0,”postViewExpireDays”:30,”postClickExpireDays”:30,”minMinutesPerConv”:10}},”accountStatus”:1,”seatId”:1000}
From this we will need the exchangeId, in this example it is 1361577.
 
Format to build the correct urls:
Segment Pixels:
https://one.progmxs.com/seg?add=XXXXXXXX&t=2
Conversion Pixels:
https://one.progmxs.com/px?id=XXXXXXXX&t=2
 Just replace the “XXXXXXXX” with the exchange Ids from the responses.
The full html tags with the correct wrappers are as follows:
 
Image pixel for our segment pixel:
<img src=”https://one.progmxs.com/seg?add=23462667&t=2″ width=”1″ height=”1″ />
Image pixel for our conversion pixel:
<img src=”https://one.progmxs.com/px?id=1361577&t=2″ width=”1″ height=”1″ />
 
Place these in the headers of each of the pages that you wish to put them on. 
 

© 2025 Pontiac Wiki Sec · All Rights Reserved · Developed by RDK

  • Contact Us
  • Privacy Policy
  • Terms & Conditions
  • Pontiac.media