On this page
The table below outlines all the available options for each property, along with the default option.
| Property | Description & Available Options | Default |
|---|---|---|
| PropertyapiKey | Description & Available OptionsThe apikey of your license. | Default |
| Propertyproduct | Description & Available OptionsThe product corresponding to your license's plan. It can be either COMMUNITY , PRO, PRO_MULTISITE, or CUSTOM for the Enterprise PRO plan. | Default |
| PropertynecessaryCookies | Description & Available OptionsView the necessaryCookies support section | Default |
| PropertyoptionalCookies | Description & Available OptionsView the optionalCookies support section | Default |
| Propertymode | Description & Available OptionsDetermines 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). | DefaultGDPR |
| PropertyconsentCookieExpiry | Description & Available OptionsDetermines how many days the consent of the user will be remembered for. This setting will apply globally to all categories. | Default90 |
| Propertystatement | Description & Available OptionsView the statement support section | Default |
| PropertyccpaConfig | Description & Available OptionsView the CCPA support section | Default |
| PropertylogConsent | Description & Available OptionsDetermines 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. | Defaulttrue |
| PropertyencodeCookie | Description & Available OptionsDetermines whether or not the value of Cookie Control's own cookie should be encoded as a Uniform Resource Identifier (URI) component. | Defaultfalse |
| PropertysubDomains | Description & Available OptionsDetermines 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. | Defaulttrue |
| PropertyinitialState | Description & Available OptionsDetermines 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. | Defaultopen |
| PropertynotifyOnce | Description & Available OptionsDetermines 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. | Defaultfalse |
| PropertyrejectButton | Description & Available OptionsDetermines 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 alloptionalCookies will be revoked. | Defaulttrue |
| Propertylayout | Description & Available Options PRO Determines the display type and behaviour of Cookie Control.Possible values are either slideout or popup (pro licenses only). | Defaultslideout |
| Propertyposition | Description & Available OptionsDetermines the side of the display Cookie Control will occupy. Possible values are either left or right . | Defaultright |
| Propertytheme | Description & Available OptionsPossible values are either light or dark . | Defaultdark |
| PropertytoggleType | Description & Available OptionsDetermines the control toggle for each item within optionalCookies Possible values are either slider or checkbox . | Defaultslider |
| PropertyacceptBehaviour | Description & Available OptionsThis 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 . | Defaultall |
| PropertycloseOnGlobalChange | Description & Available OptionsIf 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. | Defaulttrue |
| PropertycloseStyle | Description & Available OptionsDetermines the closing behaviour of the module. Possible values are either icon , labelled or button. | Defaulticon |
| PropertynotifyDismissButton | Description & Available OptionsSet this to false if you are using the notify interface and don't wish to show the (X) close icon on it. | Defaulttrue |
| PropertysettingsStyle | Description & Available OptionsDetermines the appearance of the settings button on the notification bar. Possible values are either button or link | Defaultlink |
| Propertytext | Description & Available OptionsView the text support section | Default |
| PropertysetInnerHTML | Description & Available OptionsBy default, only plain text is accepted within Text Object properties. If this property is set to true , HTML content will also be accepted. | Defaultfalse |
| Propertybranding | Description & Available Options | Defaultopen |
| PropertyexcludedCountries | Description & Available Options PRO | Defaultopen |
| Propertylocales | Description & Available Options | Default |
| Propertylocale | Description & Available Options | Defaultwindow. navigator. language |
| PropertyonLoad | Description & Available OptionsDefines a function to be triggered after the module initiates the defined configuration. | Default |
| Propertyaccessibility | Description & Available OptionsView the accessibility support section | Default |
| PropertysameSiteCookie | Description & Available OptionsIf 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. | Defaulttrue |
| PropertysameSiteValue | Description & Available OptionsUsed 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. | DefaultLax |
| PropertysecureCookie | Description & Available OptionsExpects a boolean value to determine whether or not Cookie Control's own cookie will be marked as Secure. | Defaultfalse |
| PropertyccCookie | Description & Available OptionsCustomise the name of the cookie that Cookie Control uses to store user preferences. Cookie Control will automatically sanitise invalid names. Santisation includes the replacement of capital letters to lower case and the removal of whitespace. | DefaultCookieControl |
If you wish to handle consent changes directly within your sites HTML please follow the steps within this article.
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 | Function |
|---|---|---|
| Methodload | Description Initiates the module based on the defined configuration object, passed in as a parameter. | FunctionCookieControl.load( { ... config } ) |
| Methodupdate | Description Updates the module with a new configuration object, passed in as a parameter. | FunctionCookieControl.update( { ... config } ) |
| Methodopen | Description Triggers the module's open state. Useful if you wish to add your access points within privacy pages, etc. | FunctionCookieControl.open() |
| Methodhide | Description Triggers the module's closed state. Useful if you have opened it with your own access points. | FunctionCookieControl.hide() |
| MethodnotifyAccept (deprecated) | Description 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() | FunctionCookieControl.notifyAccept() |
| MethodnotifyReject (deprecated) | Description Programmatically sets the notification bar as rejected, which in turn disables the configuration's recommended purposes. | FunctionCookieControl.notifyReject() |
| MethodnotifyDismiss (deprecated) | Description Programmatically sets the notification bar as dismissed. Useful if you wish to add your own behaviour, such as dismissing after scroll. | FunctionCookieControl.notifyDismiss() |
| MethodacceptAll | Description 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. | FunctionCookieControl.acceptAll() |
| MethodrejectAll | Description Programmatically rejects all cookie purposes. | FunctionCookieControl.rejectAll() |
| Methodconfig | Description Returns the configuration object currently used by the module. | FunctionCookieControl.config() |
| MethodgeoInfo | Description Returns the geoLocation object used by the module, describing a user&aposs location by name, ISO code and EU status. | FunctionCookieControl.geoInfo() |
| MethodgeoTest | Description 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. This will send a request to our server to determine the location — either synchronously or asynchronously depending on whether a callback is provided. Parameters:
Example using a callback (recommended): Example without a callback (synchronous): | FunctionCookieControl.geoTest(product, apikey, callback) |
| MethodgetCookie | Description Retrieve a cookie, by passing its name as a string parameter. Returns the value of the cookie if it exists, or | FunctionCookieControl.getCookie('CookieControl') |
| MethodgetAllCookies | Description Retrieves all cookies set on the current page. Returns an object with key/value pairs of cookies and their values. | FunctionCookieControl.getAllCookies() |
| MethodsaveCookie | Description Saves a cookie, by passing its name, value, and expiry length as parameters. | FunctionCookieControl.saveCookie('name', 'value', 90) |
| Methoddelete | Description Deletes a cookie, by passing its name as a string parameter. | FunctionCookieControl.delete('CookieControl') |
| MethoddeleteAll | Description Deletes all cookies set on the current page. | FunctionCookieControl.deleteAll() |
| MethodchangeCategory | Description Changes consent for a specific category using its index in the optionalCookies array.
| FunctionCookieControl.changeCategory(0, true) |
| MethodtoggleCategory | Description Toggles consent for a specific category by index in the optionalCookies array. If already accepted, it revokes; if not, it grants. | FunctionCookieControl.toggleCategory(0) |
| MethodgetCategoryConsent | Description Gets the consent state (true/false) of a category by its index in the optionalCookies array. | FunctionCookieControl.getCategoryConsent(0) |