SDK CMP : Consent Mode
Last updated
Last updated
Here's how to do it:
2 parameters must be entered:
The siteID
The privacyID
This file is optional!
The json file allows you to display the privacy centre (2nd level of the CMP) without the need for any specific development and therefore at a lower cost.
Please note, however, that the json file does not allow for much customisation. If your graphic expectations are very high, we recommend that you develop this UI yourself, using our
One of the main advantages of json is that it allows you to update the privacy centre without having to resubmit your application to the store.
*The assistance of a consultant is required for json configuration.
You can create your own privacy centre
You can develop your own interface if you wish, but make sure you use the recommended methods (later in this document) so that the consent is correctly interpreted by the SDK.
All you need to do is add the SDK methods for each user action on your main banner and your privacy centreTo track user actions correctly, and feed the dashboards (to find out the opt-in rate) you'll need to implement a few functions
You can find the entire library here https://github.com/CommandersAct/tcconsent-flutter-plugin/blob/master/lib/tc_consent.dart
The json file only manages the privacy centre
If you want to configure a first level of CMP (with the buttons accept all, set cookies, refuse all) you will have to develop it yourself. To track user actions correctly, and feed the dashboards (to find out the opt-in rate) you will have to implement a few functions (detailed later in this document).
You can also consult the entire library here https://github.com/CommandersAct/tcconsent-flutter-plugin/blob/master/lib/tc_consent.dart
On your first banner
With json, all you have to do is integrate these methods on the buttons
Without json Use the saveConsentFromConsentSourceWithPrivacyAction method By feeding the consent, source and action parameters
On your first banner & On your custom privacy centre (if you don't use json)
Use the method saveConsentFromConsentSourceWithPrivacyAction method
Fill the consent parameter as follows Define the consent table with the correct values
Remember: 1 means accept, 0 means refuse
For an accept all button, everything will have a value of 1
For a refuse all button, everything will have a value of 0
*If you use json, this part will be managed natively by the SDK in the privacy centre.
On your first banner AND on your custom privacy centre (if you don't use json)
Don't know your category and vendor IDs?
You can view them easily on the platform in the
Trust => Categories & Tags tab.
If you prefer, you can ask your consultant to provide them for you.
On your first banner AND on your custom privacy centre (if you're not using json)
In the method saveConsentFromConsentSourceWithPrivacyAction method
Set the source parameter to the correct value
Possible values
*if you use json, this part will be managed natively by the SDK for the privacy centre.
Prerequisite:
In the SDK settings, you need to enter a banner ID.
To obtain this ID, we strongly recommend that you create a banner dedicated to your app on the interface (Source => Privacy Banners).
This banner does not need any text or graphic style. It simply needs to include the same categories (privacy centre) as those of your application.
No need to generate and/or deploy this banner
Its main purpose is to create a column in the dashboard interface
Main banner (with json)
Here are the functions to integrate if you use json :
Main banner (without json)
Here are the functions to integrate if you don't use json :
Privacy Center (with json)
You don't have to do a thing, it's all native
Privacy Center (without json)
Here are the functions to integrate if you don't use json :
Only 2 steps to follow!
Prerequisite: have a Commanders Act banner on your website
Step 1: Your IT team must retrieve the consent using the method below and transfer it via a local storage
*Recommendation for naming the local storage key: rgpd_consent
Step 2: A consultant must implement custom javascript code in the web banner to interpret the local storage correctly.