{"__v":4,"_id":"55e8b59ef0f1850d00d24a63","category":{"__v":3,"_id":"5603738d0c78b00d0039af47","pages":["561311eb41a9ec0d00a3fdf8","56958542cb14e11700f8a86e","56ad90e50c1cab0d009f658b"],"project":"5429beef1163360800ed31fa","version":"5429beef1163360800ed31fd","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-24T03:52:45.801Z","from_sync":false,"order":5,"slug":"exchange","title":"Marketplace"},"parentDoc":null,"project":"5429beef1163360800ed31fa","user":"55e74aae73169617001f2e78","version":{"__v":20,"_id":"5429beef1163360800ed31fd","project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-03T21:03:26.745Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"## AdsNative Cookie Sync Specs\n\n**Overview**\n\nTo build an association between AdsNative cookies and DSP cookies, AdsNative provides a simple cookie matching service and hosted match table for clients.\n\n1. Components\n\nThe main components of the cookie match are:\n\nAdsNative match URL endpoint (ANcm): https://rudy.adsnative.com/cm.gif\n\nDSP-provided match URL endpoint (DSPcm): https://ads.dsp.com/cookie.gif\n\nCookie matching is implemented through 302 redirects between ANcm and DSPcm\n\n2. Parameters\n\nThe following parameters may be attached to ANcm:\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameters\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"dspid (required)\",\n    \"0-1\": \"DSP Identifier - Assigned by Adsnative\",\n    \"1-0\": \"buid (required)\",\n    \"1-1\": \"DSP User Cookie ID\",\n    \"2-0\": \"rurl (optional)\",\n    \"2-1\": \"Redirect URL - only allowed for smode=2\",\n    \"3-0\": \"smode\",\n    \"3-1\": \"Sync Mode (int) \\n\\n1 = Adsnative pings DSPcm to sync. [Default] \\n2 = DSPs initiates cookie syncing and pings ANcm\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n3. Sync Modes\n\nTo provide flexibility for clients, AdsNative cookie matching services can be accessed with two modes:\n\nDefault On request from AdsNative publisher sites, Adsnative will ping DSPcm to initiate cookie sync.\n\n  * ANcm will be served on all AdsNative publisher sites. \n  \n  * When a user visits the publisher’s site, AdsNative issues a 302 redirect to the DSPcm. \n  \n  * If there exists a DSP cookie id, the DSP should 302 redirect back to ANcm with the following arguments:\n  \n  dspid - DSP identifier on the AdsNative Marketplace [Provided by Adsnative]\n  buid - DSP’s user cookie id \n  https://rudy.adsnative.com/cm.gif?dspid=1234&buid=HJPK4VSL \n  AdsNative will then serve a 1x1 gif pixel on user’s browser.\n\nWhen user visits a demand partner’s sites, DSPs can ping ANcm to initiate cookie sync.\n\n* For use when cookie syncing directly from an advertiser websites. \n\n* When a user visits any website that the DSP is tracking users on, the DSP should issue a \n\n302 redirect to ANcm with the:\ndspid\nbuid\nsmode=2\nrurl [optional]: DSP may pass an additional rurl parameter to specify an url-encoded redirect URL that AdsNative will issue when cookie sync is completed. \n\nAdsNative redirect to rurl defined. If no rurl is provided, AdsNative will return a 1x1 transparent pixel to the user’s browser.\n\nFor example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://rudy.adsnative.com/cm.gif?smode=2&dspid=1234&buid=HJPK4VSL&rurl=http%3A//ad.dsp.com/match.gif\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n4. OpenRTB Integration\n\nCookie sync is used in conjunction with the Adsnative RTB Exchange: The bid request object will contain both the Adsnative User ID, provided in the User.id field, and the matched DSP Cookie ID, provided in the User.buyeruid field.","excerpt":"","slug":"cookie-sync","type":"basic","title":"Cookie Sync"}
## AdsNative Cookie Sync Specs **Overview** To build an association between AdsNative cookies and DSP cookies, AdsNative provides a simple cookie matching service and hosted match table for clients. 1. Components The main components of the cookie match are: AdsNative match URL endpoint (ANcm): https://rudy.adsnative.com/cm.gif DSP-provided match URL endpoint (DSPcm): https://ads.dsp.com/cookie.gif Cookie matching is implemented through 302 redirects between ANcm and DSPcm 2. Parameters The following parameters may be attached to ANcm: [block:parameters] { "data": { "h-0": "Parameters", "h-1": "Description", "0-0": "dspid (required)", "0-1": "DSP Identifier - Assigned by Adsnative", "1-0": "buid (required)", "1-1": "DSP User Cookie ID", "2-0": "rurl (optional)", "2-1": "Redirect URL - only allowed for smode=2", "3-0": "smode", "3-1": "Sync Mode (int) \n\n1 = Adsnative pings DSPcm to sync. [Default] \n2 = DSPs initiates cookie syncing and pings ANcm" }, "cols": 2, "rows": 4 } [/block] 3. Sync Modes To provide flexibility for clients, AdsNative cookie matching services can be accessed with two modes: Default On request from AdsNative publisher sites, Adsnative will ping DSPcm to initiate cookie sync. * ANcm will be served on all AdsNative publisher sites. * When a user visits the publisher’s site, AdsNative issues a 302 redirect to the DSPcm. * If there exists a DSP cookie id, the DSP should 302 redirect back to ANcm with the following arguments: dspid - DSP identifier on the AdsNative Marketplace [Provided by Adsnative] buid - DSP’s user cookie id https://rudy.adsnative.com/cm.gif?dspid=1234&buid=HJPK4VSL AdsNative will then serve a 1x1 gif pixel on user’s browser. When user visits a demand partner’s sites, DSPs can ping ANcm to initiate cookie sync. * For use when cookie syncing directly from an advertiser websites. * When a user visits any website that the DSP is tracking users on, the DSP should issue a 302 redirect to ANcm with the: dspid buid smode=2 rurl [optional]: DSP may pass an additional rurl parameter to specify an url-encoded redirect URL that AdsNative will issue when cookie sync is completed. AdsNative redirect to rurl defined. If no rurl is provided, AdsNative will return a 1x1 transparent pixel to the user’s browser. For example: [block:code] { "codes": [ { "code": "https://rudy.adsnative.com/cm.gif?smode=2&dspid=1234&buid=HJPK4VSL&rurl=http%3A//ad.dsp.com/match.gif", "language": "curl" } ] } [/block] 4. OpenRTB Integration Cookie sync is used in conjunction with the Adsnative RTB Exchange: The bid request object will contain both the Adsnative User ID, provided in the User.id field, and the matched DSP Cookie ID, provided in the User.buyeruid field.