U kunt het gedrag van de SDK configureren door voorafgaande opties door te geven voordat het script wordt geladen.
Bij het laden van het script zal onze SDK controleren of een axeptioSettings-object eerder is gedeclareerd. Als dit het geval is, zal het deze parameters gebruiken.
Wanneer u Axeptio installeert:
Door ons script te kopiëren en plakken, ziet u een van de eerste verplichte instellingen: de clientId.
Dit is de unieke identificatie van uw project waarmee uw configuratie wordt geladen.
U heeft ook de cookiesVersion die een van de parameters is die naar onze SDK kan worden verzonden.
Alle opties van axeptioSettings
In het axeptioSettings-object kunt u andere parameters toevoegen die onze SDK kan interpreteren.
Zoals hier de userCookiesDuration die het aantal dagen is dat de cookie actief is.
Hier ingesteld op 180 dagen.
Alle parameters hebben standaardwaarden die u ongewijzigd kunt laten.
window.axeptioSettings = {
userCookiesDuration: 180
}
De verschillende eigenschappen van dit object zijn als volgt:
/** @type {string} clientId ObjectID corresponding to the project object */
clientId;
/** @type {Token} user token set by the website (if the user is logged in)*/
tokenInstance;
/**
* String identifier of the version of Cookie configuration
* that should be loaded. If this parameter is omitted, then it's the "pages"
* property in the configuration that gets parsed in case of
* multiple cookies configurations.
* @type {string}
*/
cookiesVersion;
/**
* Flag to tell whether GTM Events should be written in the dataLayer variable or not
* @type {boolean}
*/
triggerGTMEvents = true;
/**
* Name of the cookies containing the JSON value of user choices
* @type {string}
*/
jsonCookieName = 'axeptio_cookies';
/**
* Name of the cookies that stores authorized vendors (comma-separated string)
* @type {string}
*/
authorizedVendorsCookieName = 'axeptio_authorized_vendors';
/**
* Name of the cookies that stores authorized vendors (comma-separated string)
* @type {string}
*/
allVendorsCookieName = 'axeptio_all_vendors';
/**
* Number of days used the cookie holding user's choices should be active
* @type {number|"page"|"session"}
*/
userCookiesDuration = 365;
/**
* If specified, domain name on which the cookie containing user choices
* will be available. This allows to request one consent for various subdomains
* @type {string}
*/
userCookiesDomain = 'mondomaine.com';
/**
* If specified, define the SameSite value of the cookie. Usually Lax, Strict or None.
* @type {string}
*/
userCookiesSameSite;
/**
* Whether or not the cookie holding choices is HTTPS only
* @type {boolean}
*/
userCookiesSecure = true;
/**
* If set to true, Axeptio will open the cookie widget if the vendors described
* in the current cookie config do not match the vendors saved in the visitors
* cookies.
* @type {boolean}
*/
openCookiesWidgetIfVendorsMismatch = false;
/**
* ClassName of the <div> tag were Axeptio's WebsiteOverlay will be mounted
* @type {string}
*/
mountClassName = 'axeptio_mount';
/**
* URL on which the widget will send its POST and GET requests, if you use serverSide
* for querying and storing consent proofs.
* @type {string}
*/
apiUrl = 'https://api.axept.io/v1';
/**
* Boolean for the geolocation feature
* To base it on the website's language
* Or the browser language (default)
* @type {boolean}
*/
useDocumentLang = false;
Varnish
Voor Varnish-gebruikers verhindert het cachen van inhoud het gebruik van cookies, tenzij deze met een voorvoegsel zijn voorzien. Zie de Gandi-documentatie hierover. Om deze beperking te omzeilen, kunt u de twee Axeptio-cookies hernoemen door ze in uw axeptioSettings-object te declareren:
window.axeptioSettings = {
authorizedVendorsCookieName: "STYXKEY_axeptio_vendors",
jsonCookieName: "STYXKEY_axeptio_json"
}