Events & Variables
Events are pushed by the Didomi Web SDK to your tag management system. Events provide variables that contain the user status on vendors and purposes.
You can then setup your rules based on events and variables to decide whether a tag can be loaded or not directly from your tag manager.
Events
didomi-ready
: This event is pushed exactly once when the page is loaded and can be used for any tag that you want to fire exactly once on the page. The status of the user at the time of this event might be unknown.didomi-consent-changed
: This event is pushed every time the user status changes as the result of a user interacting with the Didomi consent notices or preferences.didomi-consent
: This event is pushed once when the page is loaded and then every time the user status changes as the result of a user interacting with the Didomi consent notices or preferences. Because this event does not distinguish between a page load and a subsequent status change, it can be fired multiple times on the page and is not suited for tags that must be fired at most once. You will usually want to use a combination of thedidomi-ready
anddidomi-consent-changed
events instead for these cases.
Variables
Vendors
These variables provide the user status for the vendors configured in your notice.
The user status reported for vendors automatically includes the status for their required purposes. You usually do not have to create a trigger that uses both vendors AND purposes variables: a trigger on vendors is enough.
Example: the vendor ID google
is only included in the list of enabled vendors, if the user has enabled google
and every purpose required by that vendor.
Variable | Description |
---|---|
|
|
|
|
|
|
Vendor IDs
All variables have the same format: a comma-separated list of vendor IDs terminated by a final comma.
To find your vendor ID, navigate to the Didomi Console -> Consent notices -> Open your notice -> Regulation -> Edit vendors and Purposes: Use the API ID.
Vendor IDs are unique and are the same across all regulations and notices.
Purposes
These variables contain the user status for the purposes configured in your notice.
You usually do not need to use these variables directly and want to use the vendors variables instead.
All variables have the same format: a comma-separated list of purpose IDs terminated by a final comma. Example: cookies,analytics,
Variable | Description |
|
|
|
|
AB tests
We expose variables that contain the status of the AB test running (if any). That allows you to track your AB tests results through your own analytics solution.
Variable | Description | Values / Example |
| ID of the AB test running. | The value of the |
| The group that the user is a part of. |
An empty string is provided if the user is not part of the control or test group. |
GDPR & IAB
Variable | Description | Values / Example |
| Define whether the GDPR applies to the current user (ie the user is located in the EU or your website is configured to enforce GDPR for all users). |
|
| The IAB consent string as defined in the Consent String and Vendor List Format specification. It encodes the consent information for every vendor and purpose as well as few other pieces of information on the CMP that created the string. |
|
Last updated