{"id":736,"date":"2020-12-22T14:55:36","date_gmt":"2020-12-22T14:55:36","guid":{"rendered":"https:\/\/wiki.pontiac.media\/?page_id=736"},"modified":"2021-12-08T15:08:30","modified_gmt":"2021-12-08T15:08:30","slug":"posting-pixels","status":"publish","type":"docs","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/posting-pixels","title":{"rendered":"Posting Pixels"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">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).<\/span><br \/>\n<span style=\"font-weight: 400;\">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 \u201cexchangeId\u201d is assigned to the pixel. Because of this you must submit a get request later to retrieve the exchangeId to actually place the pixels.<\/span><br \/>\n&nbsp;<\/p>\n<h5>Posting a Conversion Pixel<\/h5>\n<p>&nbsp;<br \/>\n<span style=\"font-weight: 400;\">curl -X POST -H &#8216;auth:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjUgMDI6Mjc6MTYifQ.JpVp62T-VEbuxquTXHXaKqhrqEIef1Hq3PpaRgExzrg&#8217; -d &#8216;{<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;name&#8221;:&#8221;testConversionPixel&#8221;,<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;pontiacAdvertiserId&#8221;:1713,<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;status&#8221;:1<\/span><br \/>\n<span style=\"font-weight: 400;\">}&#8217; &#8216;https:\/\/api.pontiac.media\/pontiac\/conversion-pixel&#8217;<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0<\/span><br \/>\n<b>Response:<\/b><br \/>\n<span style=\"font-weight: 400;\">{&#8220;timestamp&#8221;:&#8221;Mon Aug 24 19:56:19 UTC 2020&#8243;,&#8221;response&#8221;:{&#8220;ConversionPixel&#8221;:{&#8220;pontiacPixelId&#8221;:980,&#8221;seatId&#8221;:1000,&#8221;name&#8221;:&#8221;testConversionPixel&#8221;,&#8221;pontiacAdvertiserId&#8221;:1713,&#8221;triggerType&#8221;:&#8221;hybrid&#8221;,&#8221;status&#8221;:1,&#8221;orderIdMacro&#8221;:0,&#8221;valueMacro&#8221;:0,&#8221;postViewExpireDays&#8221;:30,&#8221;postClickExpireDays&#8221;:30,&#8221;minMinutesPerConv&#8221;:10}},&#8221;accountStatus&#8221;:1,&#8221;seatId&#8221;:1000}<\/span><br \/>\n&nbsp;<br \/>\n<span style=\"font-weight: 400;\">From this we will need the <\/span><b>pontiacPixelId<\/b><span style=\"font-weight: 400;\">. We will pass this in when making the Line, in this example it is <\/span><b>980<\/b><span style=\"font-weight: 400;\">.<\/span><br \/>\n&nbsp;<\/p>\n<h5>Posting a Segment Pixel<\/h5>\n<p>&nbsp;<br \/>\n<span style=\"font-weight: 400;\">curl -X POST -H &#8216;auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjYgMDE6Mzk6MDkifQ.W475vyhEafa9TN94OaLkUEHWF7YkI6t-tJbKBIYqN6A&#8217; -d &#8216;{<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;name&#8221;:&#8221;testSegmemtPixel&#8221;,<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;pontiacAdvertiserId&#8221;:1713<\/span><br \/>\n<span style=\"font-weight: 400;\">}&#8217; &#8216;https:\/\/api.pontiac.media\/pontiac\/segment&#8217;<\/span><br \/>\n&nbsp;<br \/>\n<b>Response:<\/b><br \/>\n<span style=\"font-weight: 400;\">{&#8220;timestamp&#8221;:&#8221;Tue Aug 25 17:39:44 UTC 2020&#8243;,&#8221;response&#8221;:{&#8220;SegmentPixel&#8221;:{&#8220;pontiacSegmentId&#8221;:22672,&#8221;seatId&#8221;:1000,&#8221;name&#8221;:&#8221;testSegmemtPixel&#8221;,&#8221;pontiacAdvertiserId&#8221;:1713,&#8221;cost&#8221;:0.0,&#8221;segmentPixelType&#8221;:&#8221;firstParty&#8221;}},&#8221;accountStatus&#8221;:1,&#8221;seatId&#8221;:1000}<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0<\/span><br \/>\n<span style=\"font-weight: 400;\">From this we will need the <\/span><b>pontiacSegmentId<\/b><span style=\"font-weight: 400;\">. We will pass this in when making the Line, in this example it is <\/span><b>22672<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":714,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-736","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/736","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=736"}],"version-history":[{"count":1,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/736\/revisions"}],"predecessor-version":[{"id":6468,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/736\/revisions\/6468"}],"up":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/714"}],"next":[{"title":"Posting a Line Item","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/posting-a-line-item","href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/740"}],"prev":[{"title":"Uploading a Creative","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/uploading-a-creative","href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/730"}],"wp:attachment":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=736"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=736"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}