Cookie Control from CIVIC

All Available Options


Anchor point for Configuration Options Configuration Options

The table below outlines all the available options for each property, along with the default option.

PropertyDescription & Available OptionsDefault
apiKeyThe apikey of your license.
productThe product corresponding to your license's plan.

It can be either COMMUNITY , PRO, PRO_MULTISITE, or CUSTOM for the Enterprise PRO plan.
necessaryCookiesView the necessaryCookies support section
optionalCookiesView the optionalCookies support section
modeDetermines the mode in which Cookie Control runs. Possible values are either GDPR or CCP .

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
consentCookieExpiryDetermines how many days the consent of the user will be remembered for. This setting will apply globally to all categories.90
statementView the statement support section
ccpaConfigView the CCPA support section
logConsentDetermines 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
encodeCookieDetermines whether or not the value of Cookie Control's own cookie should be encoded as a Uniform Resource Identifier (URI) component.false
subDomainsDetermines 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
initialStateDetermines 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
notifyOnceDetermines 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
rejectButtonDetermines 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
positionDetermines the side of the display Cookie Control will occupy.

Possible values are either left or right .
right
themePossible values are either light or dark .dark
toggleTypeDetermines the control toggle for each item within optionalCookies

Possible values are either slider or checkbox .
slider
acceptBehaviourThis 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
closeOnGlobalChangeIf 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
closeStyleDetermines the closing behaviour of the module.

Possible values are either icon , labelled or button.
icon
notifyDismissButtonSet this to false if you are using the notify interface and don't wish to show the (X) close icon on it.true
settingsStyleDetermines the appearance of the settings button on the notification bar.

Possible values are either button or link
link
textView the text support section
setInnerHTMLBy 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
onLoadDefines a function to be triggered after the module initiates the defined configuration.
accessibilityView the accessibility support section
sameSiteCookieIf 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
sameSiteValueUsed 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 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.

MethodDescription
load

Initiates the module based on the defined configuration object, passed in as a parameter.

function CookieControl.load( { ... config } )

update

Updates the module with a new configuration object, passed in as a parameter.

function CookieControl.update( { ... config } )

open

Triggers the module's open state. Useful if you wish to add your access points within privacy pages, etc.

function CookieControl.open()

hide

Triggers the module's closed state. Useful if you have opened it with your own access points.

function CookieControl.hide()

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()

function CookieControl.notifyAccept()

notifyReject (deprecated)

Programmatically sets the notification bar as rejected, which in turn disables the configuration's recommended purposes.

function CookieControl.notifyReject()

notifyDismiss (deprecated)

Programmatically sets the notification bar as dismissed. Useful if you wish to add your own behaviour, such as dismissing after scroll.

function CookieControl.notifyDismiss()

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.

function CookieControl.acceptAll()

rejectAll

Programmatically rejects all cookie purposes.

function CookieControl.rejectAll()

config

Returns the configuration object currently used by the module.

function CookieControl.config()

geoInfo

Returns the geoLocation object used by the module, describing a user's location by name, ISO code and EU status.

function default: CookieControl.geoInfo()

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:
  • product: The product of your license
  • apikey The apikey of your license
  • callback (OPTIONAL): A callback to run when the request returns. If this option is missing, the request will be synchronous.
Returns the geoLocation object used by the module, describing a user's location by name, ISO code and EU status.

function CookieControl.geoTest(product, apikey, callback)

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.

function CookieControl.getCookie('CookieControl')

getAllCookies

Retrieves all cookies set on the current page.Returns an object with key value pairs of the cookies and their respective values.

function CookieControl.getAllCookies()

saveCookie

Saves a cookie, by passing its name, value, and expiryLength as a parameters.

function CookieControl.saveCookie( 'name', 'value', 90 )

delete

Deletes a cookie, by passing its name as a string parameter.

function CookieControl.delete('CookieControl')

deleteAll

Deletes all cookies set on the current page.

function CookieControl.deleteAll()

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.

function CookieControl.changeCategory( 0, true )

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.

function CookieControl.toggleCategory( 0 )

getCategoryConsent

Gets the consent state of a particular category, passed as a number parameter describing its index within the optionalCookies array. Returns a boolean.

function CookieControl.getCategoryConsent( 0 )