Set GDPR consent

Prev Next

Suggested reading: Insider and General Data Protection Regulation (GDPR)

This method allows you to get your users' consent to collect data. You can call this method after the SDK initialization at every step where you request your users' consent.

your title goes here
Insider SDK collects this data by default. You do not need to call this function if you are not asking for users' consent. 
ParameterData Type
gdprConsentBoolean
your title goes here
If you set it to false, the user will not share any data or receive any push notifications until you set it back to true.

Method Signature

setGDPRConsent(gdprConsent: boolean): void;

Method Example

window.Insider.setGDPRConsent(true);
your title goes here
You must set the GDPR after the SDK initializes. You can place any GDPR handling after Insider SDK initializes.