Load notice by ID
By default, the Didomi SDK downloads the notice configuration from the Console by matching the package ID of the app with the IDs configured in the notice.
This works well for most use cases but does not allow granularly deciding what notice configuration should be loaded in an app. For instance, it does not allow loading different consent notices in different versions of a single app.
You can bypass app ID targeting and decide what consent notice to use in a given app by specifying the notice ID in the call to the initialize
function:
Make sure to replace the following variables in the code above:
<API Key>
: Use the public API key available in your Didomi Console<Notice ID>
: Use the notice ID available in your Didomi Console by looking at the URL when you are editing a consent notice (for instance, if your URL is https://console.didomi.io/didomi/widgets/notices/TQnRn8sr/embed, the notice ID isTQnRn8sr
)
Last updated