JonahThompson
Crownpeak Employee
Crownpeak Employee

Are there any Options Dialog Callback methods?

Jump to solution

The Consent Barrier, when we were accidentally showing it, had some sweet callback methods to let us know when the consent has been changed.


The Options dialog doesn't seem to have any callback methods.


Am I just missing something?

Labels (2)
0 Kudos
1 Solution

Accepted Solutions
JonahThompson
Crownpeak Employee
Crownpeak Employee

Re: Are there any Options Dialog Callback methods?

Jump to solution

You are correct in that most of the callback methods orient around the level 1 banner/barrier elements. There is, however, one callback for the Options Dialog that is triggered after an already provided consent is changed. This means that the user consents somehow, they go back to the Options Dialog to change their consent preferences, they save their changes, and this callback runs:

window.evidon.consentChangedCallback = function () {
  // custom code
}

Additionally, this callback can take three optional paramaters: categories, vendors, cookies. This would look like the below:

window.evidon.consentChangedCallback = function (categories, vendors, cookies) {
  // custom code
}

View solution in original post

Tags (2)
0 Kudos
1 Reply
JonahThompson
Crownpeak Employee
Crownpeak Employee

Re: Are there any Options Dialog Callback methods?

Jump to solution

You are correct in that most of the callback methods orient around the level 1 banner/barrier elements. There is, however, one callback for the Options Dialog that is triggered after an already provided consent is changed. This means that the user consents somehow, they go back to the Options Dialog to change their consent preferences, they save their changes, and this callback runs:

window.evidon.consentChangedCallback = function () {
  // custom code
}

Additionally, this callback can take three optional paramaters: categories, vendors, cookies. This would look like the below:

window.evidon.consentChangedCallback = function (categories, vendors, cookies) {
  // custom code
}

View solution in original post

Tags (2)
0 Kudos