What is dataLayers and how to use it to integrate with the GDPR/CCPA app

Even if it sounds complicated, dataLayers are very simple - it is a JavaScript object, whose job is to gather data, that can later be used for other tools utilized on the site. Let's see how and for what the GDPR/CCPA app uses the dataLayers.

Integrating with the GDPR/CCPA app

The dataLayer used for the GDPR/CCPA app gives other apps that want to integrate with it information about the consent settings of the customers. This can be done by checking the consent_status entry in the dataLayer variable. The consent_status entry contains the property's status and categories. The "status" property indicates the state of the client's cookie preferences. That state can be allow, or decline.

"Allow" is set when both the Analytics and Marketing cookie categories are not blocked. This status will be set if the cookies are not blocked before and/or after the client interacts with the Cookie bar.

"Decline" is set when the Analytics, Marketing, or both cookie categories are blocked. This status will be set if the cookies are blocked before and/or after the client interacts with the Cookie bar.

The "category" property contains information that shows if each of our app's cookie categories are blocked or accepted.

In this screenshot, we see that all cookie categories are accepted from their state being set to true.

If a client is located outside of the region our app is enabled for, he will not be seeing the Cookie bar. Therefore the "status" property will automatically be set to allow and the cookie categories will be set to true indicating that they are not blocked.

And this is all of the information regarding the dataLayers of the GDPR/CCPA + Cookie Management app. To keep yourself up to date on all of the ways to be compliant, follow us on our social media channels, and for questions, don't hesitate to contact us via chat or email, or simply check our FAQ page.

Join 11,000+ subscribers receiving actionable E-commerce advice

* Unsubscribe any time

Trending blogs

comments powered by Disqus