Littledata has written a script to integrate TrustArc with Shopify's Customer Privacy API. This makes TrustArc compatible with Shopify's own tracking, and Littledata's enhanced tracking scripts.
<!-- TrustArc to Shopify Customer Privacy API integration by Littledata --> <script src="https://master-shopify-tracker.s3.amazonaws.com/trustArc.js"/>
respectUserTrackingConsentin the LittledataLayer settings.
After the TrustArc PrivacyManager loads, this script registers an event to be triggered when the user updates their preferences.
When that update happens, if the user has consented to 'Functional Cookies' (to analyze site usage so we can measure and improve performance), the
userCanBeTracked field is set to
true and Shopify and Littledata's tracking then starts.
This will also work with any other apps which integrate with Shopify's Customer Privacy API.
If the user later revokes consent to Functional Cookies , then
userCanBeTracked is set to
The full source of the script is available here.