Developer guide for JavaScript methods


The Secure privacy script loads a client-side JavaScript object named ‘sp’ which exposes the following public methods. Use these methods optionally to trigger your banners.

Name Parameters Description
sp.showPrivacyBanner(); None Forces the privacy banner to show.
sp.hidePrivacyBanner(); None Forces the privacy banner to hide.
sp.showTrustWidget(true); true Forces the trust widget to show.

sp.hideTrustWidget();

None Forces the trust widget to hide

sp.showCookieBanner();

None  Forces the cookie banner to show
sp.hideCookieBanner(); None  Forces the cookie banner to hide

sp.hidePrivacyPolicy();

None  Forces the privacy policy popup to hide

sp.showPrivacyPolicy();

None  Forces the privacy policy popup to show
sp.removeConsent(); None Removes all consents given by the user.

It will trigger show cookie banner when the user visits the webpage again.