setAnalyticsConsent

The setAnalyticsConsent() method is the primary way to set analytics consent configuration, used mostly for 3rd party consent management platforms that do not integrate with Shopify's Customer Privacy API (Shoplift automatically will integrate with the Customer Privacy API).

The setAnalyticsConsent() method takes 1 required argument, and returns a Promise<void>

Argument
Type
Description

setConsent

boolean

Whether or not the visitor consents to analytics data processing

Example

window.shoplift.setAnalayticsConsent(consentValue);

Last updated