Cookie banner Callbacks and Endpoints - AdOpt

AdOpt's cookie banner gives users a quick and easy way to manage their consent and inform themselves of the purpose for which the data is being used. However, it is often necessary for your website or webapp to be notified of this consent. Either to block the collection of some data or to change the information displayed on the screen. Through javascript callbacks the AdOpt Banner can notify your website or webapp of a new consent setting. The callback is created by overriding the function:

window.adoptCB.

window.adoptCB = function(consent) {
 console.log('callback do adopt:', consent);
};

The format of the callback argument follows the format:

{
 cookieId: /*<ID do cookie>*/,
 optInTags: [/*<Array de IDs de Tag>*/],
 optOutTags: [/*<Array de IDs de Tag>*/]
}

Reply example:

{
 cookieId: '123abc',
 optInTags: ['456def', '789ghi'],
 optOutTags: ['012jkl', '345mno']
}

Website data endpoint

Now with the IDs of the tags that the visitor gave (or denied) consent to, you can query an endpoint with your website data and relate the IDs to the tag names.

https://disclaimer-api.goadopt.io/api/tag/disclaimer-info/<website_code>

The

website_code
here is the same as the one used in the tag you placed on the website.

This call must have a callback in the format:

{
 disclaimer: {/* configurações visuais do aviso */},
 terms: { /* url do seu Termos de Uso */ },
 policy: { /* url da sua Política de Privacidade */ },
 tags: [
   { id:"6332f834-41df-4cc5-a3bf-dffe359112c5", name:"Adopt", tag_category_id:2 },
   /* Array de objetos Tag */
 ]
}

Reply example

{
 disclaimer: {
   colors: {
     primaryColor: "#4BBAD7",
     secondaryColor: "#0a1f33",
     bgColor: "#000",
     textColor: "#fafbfc",
     position: "left",
     buttonPosition:"left"
   }
 },
 terms: {
   url:"https://goadopt.io/terms"
 },
 policy: {
   url: "https://goadopt.io/terms"
 },
 tags: [
   {
     id: "6332f834-4a0f-4cc5-a3bf-dffe345112c5",
     name: "Yahoo",
     tag_category_id: 2
   },
   {
     id:"43d4ece5-fa7c-4369-ab23-a2393f745es3",
     name: "Cloudflare",
     tag_category_id: 4
   },
   {
     id: "a4409b60-80ca-4bf8-af0d-f6cc124502b3",
     name:"Hariken",
     tag_category_id: 1
   },
   {
     id: "z81efe08-c88b-40db-b39d-0a580945ebc6",
     name:"Facebook",
     tag_category_id: 2
   },
   {
     id: "fg0ff14a-cdd8-42e1-aba3-3df22145c27c",
     name: "Google Tag Manager",
     tag_category_id: 5
   }
 ]
}
Logo
Address: 7345 W Sand Lake Road, Ste 210 Office 5898 Orlando, FL 32819
EIN: 86-3965064
Phone: +1 (407) 768-3792

AdOpt

Resources

Legal Terms

© GO ADOPT, LLC since 2020 • Made by people who love

🍪