There are a few properties located at the root, window.evidon, portion of the API. The following are supported values which can be located that object.
The notice object. Modifying this value directly is not supported.
This is your company identifier. We do not support modifying this value, it should be treated as read-only.
Use this property to assign any identifier you would like for the currently active user. For example, if you have an internal user id value for the user you can place it here and we will store that information with our reporting information.
Reference to the active banner object if available. This property should be treated as read-only and modifications are not supported. This will only be set if a banner needs to be displayed to gather consent.
Reference to the active barrier object if available. This property should be treated as read-only and modifications are not supported. This will only be set if a barrier needs to be displayed to gather consent.
Reference to our “L2” object, which is used to display the more advanced consent gathering mechanisms (such as gdpr support, IAB support, etc.). This will only be set if the L2 is activated and should be treated as a read-only value. Modifications are not supported.
Reference to our “cmp” object which powers the IAB __cmp api. This object should be treated as read-only and not modified.
This is the latest version of our “L2” and is used to display more advanced consent information. This object should be treated as read-only and modifications are not supported.
This contains the country information pulled from our geo- location script. It will only have a value if the country.js script arrives before our main script api is available so should not be used as a reliable mechanism to determine the active country location.
Contains the object holding the theme information used to power the UI displays. This should be treated as a read-only property as modifications are not supported.
This is a list of the different consent combinations defined for the current domain settings. This is only for internal use and should be treated as a read-only property and not modified in any way.
Reference to the object that controls our consent link access. This should be treated as a read-only property and not modified.
Reference to the object that controls our consent button access. This should be treated as a read-only property and not modified.
This is an internal event queue and should be treated as read- only and not modified in any way.
window.evidon.notice namespace Properties
The following properties can be used from the window.evidon.notice object. These properties are provided to provide access to information that might be valuable to other scripts running on the page, but should be considered READ-ONLY. Any properties that can be modified at runtime will have a supported API method to allow that. For example, you can use the setLocation() method to change the country on the notice.
The currently active country object.
The active language code.
The active root languge. This is used to pull the correct set of translation values.
The object holding the currently active set of translations.
The settings object holding all the possible settings for the current domain.
The active domain
The object holding the currently active settings for the notice.
The identifier indicating the type of consent is active for this notice: 1: no consent 2: banner consent
3: barrier consent
The identifier indicating the type of privacy tool access mechanism to show: 1: link 2: button
Flag indicating whether the active user has provided consent.
The following list of methods are supported under the window.evidon.notice namespace.
url: the url to add to the script “src” attribute. callback: an optional function to call once the script has finished loading.
Call this API method to append a script to the current document.
actionTypeId: the action identifier for the reporting ping to execute.
This method drops a reporting “ping” to the current document. This information is used to provide our customers insight into what the scripts are doing on their pages. In general we recommend against executing any reporting calls through your scripts, but if there is a legitimate need you can use this method to do it.
A “gotcha”. We will only execute any reporting action one time. So if we have already recorded a specific action and you call this method again, it will not record the same action a second time.
Calling this method will instruct our script to drop the consent cookie and execute any consent callback/tag manager functionality. Use this call if you are going to provide a consent mechanism not currently supported by our scripts (your own consent button for example).
Returns the url to the consent tool for this notice. You can use this method to get the raw url, but we suggest using the “showConsentTool” method to actually display the consent tool.
Instructs our consent tool to be displayed based on the currently defined rules (overlay vs. new window for example). This is the recommended method to use if you are going to build your own access to our consent tool.
Just a helper method which returns true if we are running on a mobile device and false for a desktop. If you need to match any mobile vs. desktop logic from your scripts to ours we recommend using this method to check for mobile device execution.
Call this to display the notice. This is the primary method called to run all the logic and make all the checks necessary to display our notice elements based on the current environment settings (country, language, etc.). It would be unusual for any customer to need to call this from their script methods, but it is available if you need to.
locationObj: the json object containing the details for the location you want to use. The format of the object is:
This method is called to set the notice location (country). If you need to override the country settings for some reason you can use this method to accomplish that.
themes: object structure containing the theme details you want to use.
It is highly recommended you not use this method. The theme structure is relatively complex and is identifier based, so you would need to match everything up perfectly. However, if you need to tackle this for some reason it is available.
code: language code to make the active translation set
Use this method if you want to force a specific language set that is different from the user browser settings. A typical example would be a site that uses a dropdown to switch between languages where you want to force the consent messaging to match your site instead of the browser settings.
settingsObj: the json object structure containing the settings to use for the current notice.
This is another method that is available but we highly recommend not using. The setting structure is complex and needs to correlate the identifiers between the various translations and theme elements.