Page cover image

SDK CMP : Consent Mode

How do I initialise the privacy module?

Here's how to do it:

2 parameters must be entered:

  • The siteID

  • The privacyID

What is the purpose of the json file?

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.

What if I don't want to use the json file?

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.

What if I develop my own UI ?

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

Can the first level of CMP be managed via json?

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

How do you manage the accept all and reject all buttons?

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

What are the right IDs to use?

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.

How do you feed the source parameter?

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.

Last updated