Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
What is dataLayers and how to use it to integrate with the Consentmo app
Integrations
5 mins
Dilyana Simeonova
September 22, 2022
Understanding DataLayers: A Guide to Integration with Consentmo
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 Consentmo app uses the dataLayers.
Integrating with the Consentmo app
The dataLayer used for the Consentmo 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 Consentmo 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.
About the Author
Dilyana Simeonova
Dilyana is a Marketing Specialist in Consentmo with an academic background in Advertisement and Brand Management. Stumbling into the tech world with this job, she feels like she finally found her calling and is set on bringing the best compliance information to all Consentmo users.
Learn how Shopify merchants can use urgency and FOMO tactics to boost Black Friday sales and drive quick purchases during BFCM. Practical tips included!