All Available Options
Anchor point for Configuration Options
The table below outlines all the available options for each property, along with the default option.
Property | Description & Available Options | Default |
apiKey | The apikey of your license. | |
product | The product corresponding to your license's plan. It can be either COMMUNITY , PRO, PRO_MULTISITE, or CUSTOM for the Enterprise PRO plan. | |
necessaryCookies | View the necessaryCookies support section | |
optionalCookies | View the optionalCookies support section | |
mode | Determines the mode in which Cookie Control runs. Possible values are either GDPR or CCPA . When in GDPR mode, cookies will default to being off, allowing the user to opt in, while when in CCPA mode cookies will default to on and users will be allowed to opt out. In CCPA mode users can also click on a "Do Not Sell My Personal Information" button to opt out from optional cookies in bulk, as required by the legislation. For Pro users where geolocation is available, Cookie Control will always run in "gdpr" if the website visitor is inside the EU or inside Brazil. Furthermore, Pro users will be able to override this property for specific locations, for example use CCPA inside the USA or in California only. See the Locales Object for more details. Finally please note that when using CCPA mode you need to configure the CCPA Configuration Object property with a link to your Personal Information Policy (see below). | GDPR |
consentCookieExpiry | Determines how many days the consent of the user will be remembered for. This setting will apply globally to all categories. | 90 |
statement | View the statement support section | |
ccpaConfig | View the CCPA support section | |
logConsent | Determines whether or not Cookie Control should record the user's granting or revoking of consent. Please note, this is also dependent on you having agreed with CIVIC's data processor agreement. Please sign in to update your settings. | true |
encodeCookie | Determines whether or not the value of Cookie Control's own cookie should be encoded as a Uniform Resource Identifier (URI) component. | false |
subDomains | Determines whether Cookie Control's own cookie is saved to the top level domain, and therefore accessible on all sub domains, or disabled and saved only to the request host. | true |
initialState | Determines the initial display state of Cookie Control. Possible values are either open , closed, notify (pro licenses only), top (pro licenses only) or box (pro licenses only). notify will display a summary of the use of cookies in a horizontal bar at the bottom of the page, with controls to accept/reject cookies, or read more information. top is similar to notify and it will display a summary of the use of cookies in a horizontal bar, which will be at the top of the page. box is also similar to notify though it will display a summary of the use of cookies in a modal in the centre of the page. | open |
notifyOnce | Determines whether the module only shows its initialState once, or if it continues to replay on subsequent page loads until the user has directly interacted with it - by either toggling on / off a category, accepting the recommended settings, or dismissing the module. | false |
rejectButton | Determines whether the module shows a reject button alongside the accept button on the notification bar, or alongside the 'accept recommended settings' button when the panel is open. Should the user click this, consent to all optionalCookies will be revoked. | true |
layout | PRO Determines the display type and behaviour of Cookie Control.Possible values are either slideout or popup (pro licenses only). | slideout |
position | Determines the side of the display Cookie Control will occupy. Possible values are either left or right . | right |
theme | Possible values are either light or dark . | dark |
toggleType | Determines the control toggle for each item within optionalCookies Possible values are either slider or checkbox . | slider |
acceptBehaviour | This property is used to control what will happen when the user clicks on either of the 'Accept' or 'Accept recommended settings' buttons. By default all cookie purposes will be accepted. Possible values are either all or recommended . | all |
closeOnGlobalChange | If set to false the Cookie Control main window will remain open when the user clicks on either of the accept or reject buttons, and the user will have to explicitly close it using the X close icon at the top right, or the close button. | true |
closeStyle | Determines the closing behaviour of the module. Possible values are either icon , labelled or button. | icon |
notifyDismissButton | Set this to false if you are using the notify interface and don't wish to show the (X) close icon on it. | true |
settingsStyle | Determines the appearance of the settings button on the notification bar. Possible values are either button or link | link |
text | View the text support section | |
setInnerHTML | By default, only plain text is accepted within Text Object properties. If this property is set to true , HTML content will also be accepted. | false |
branding | PRO View the branding support section | open |
excludedCountries | PRO With pro and pro_multisite licenses, you are able to disable the module entirely for visitors outside of the EU. Either add the value all , or a list of 2 letter ISO codes for the countries you wish to disable the module for. Using the value all will mean the widget will be shown to users coming from IPs that belong to EU countries only. | open |
locales | PRO View the locales support section | |
locale | PRO View the locale support section | window. navigator. language |
onLoad | Defines a function to be triggered after the module initiates the defined configuration. | |
accessibility | View the accessibility support section | |
sameSiteCookie | If set to true the CookieControl cookie will be marked with the SameSite:Strict flag. Otherwise it will be flagged with SameSite:None , which however will mean that in some browsers Cookie Control will not work unless your site is served over HTTPS. | true |
sameSiteValue | Used in conjuction with the sameSiteCookie property, it controls the value of the SameSite flag for the CookieControl cookie. It can be one of Strict , Lax or None. | Lax |
Anchor point for Public Methods
Cookie Control offers various public methods to help make interacting with the module, and generally managing Cookies easier.
Please note, that by using some of these methods to set your own custom behaviour, you are taking on extra responsibility for considering and protecting people’s rights and interests.
Method | Description |
---|---|
load | Initiates the module based on the defined configuration object, passed in as a parameter.
|
update | Updates the module with a new configuration object, passed in as a parameter.
|
open | Triggers the module's open state. Useful if you wish to add your access points within privacy pages, etc.
|
hide | Triggers the module's closed state. Useful if you have opened it with your own access points.
|
notifyAccept (deprecated) | Programmatically sets the notification bar as accepted, which in turn activates the configuration's recommended purposes. Useful if you wish to add your own behaviour, such as accepting after scroll.If you choose to use this method, you are taking on extra responsibility for considering and protecting people’s rights and interests. Should you simply wish to hide the notification bar use notifyDismiss()
|
notifyReject (deprecated) | Programmatically sets the notification bar as rejected, which in turn disables the configuration's recommended purposes.
|
notifyDismiss (deprecated) | Programmatically sets the notification bar as dismissed. Useful if you wish to add your own behaviour, such as dismissing after scroll.
|
acceptAll | Programmatically accepts all cookie purposes.If you choose to use this method, you are taking on extra responsibility for considering and protecting people’s rights and interests.
|
rejectAll | Programmatically rejects all cookie purposes.
|
config | Returns the configuration object currently used by the module.
|
geoInfo | Returns the geoLocation object used by the module, describing a user's location by name, ISO code and EU status.
|
geoTest | Similar to geoInfo, but it can be used prior to loading the module. You can use it to load different config objects for different locations. Please note that this will send a request to our server in order to determine the location. This request can be either sync (blocking) or async (non blocking), depending on whether you supply a callback parameter or not (see below).It accepts three parameters:
Example using a callback (recommended):
Example without using a callback:
|
getCookie | Retrieve a cookie, by passing its name as a string parameter.Returns the value of the cookie if it exists, or 'false' otherwise.
|
getAllCookies | Retrieves all cookies set on the current page.Returns an object with key value pairs of the cookies and their respective values.
|
saveCookie | Saves a cookie, by passing its name, value, and expiryLength as a parameters.
|
delete | Deletes a cookie, by passing its name as a string parameter.
|
deleteAll | Deletes all cookies set on the current page.
|
changeCategory | Changes consent to a given purpose (cookie category), passed as a number parameter describing its index within the optionalCookies array, according to the value of the second argument (true or false)If the second argument passed is true, consent is granted, otherwise consent is revoked.
|
toggleCategory | Toggles consent to a given purpose (cookie category), passed as a number parameter describing its index within the optionalCookies array.If the user has previously given consent to this category, consent is revoked, otherwise consent is granted.
|
getCategoryConsent | Gets the consent state of a particular category, passed as a number parameter describing its index within the optionalCookies array. Returns a boolean.
|