Reputation: 1
We've integrated a widget on our clients' websites that utilizes gtag for sending events to Google Analytics (GA4). Each client provides us with their Measurement ID (tracking code / GA4 ID) for this purpose. However, we're uncertain about how to integrate our widget with their Consent Management Platform (CMP) to ensure compliance with user consent preferences.
Specific Question:
How does the CMP communicate user consent preferences to third-party vendors like us who use gtag for analytics tracking?
I've tried multiple CMPs, there's an option to be included as a vendor in any cookie, but I don't understand how our widget will know what consent has been given, because the widget (we are) does not have access to the customer's CMP.
Upvotes: 0
Views: 55
Reputation: 8081
The CMPs are typically not concerned with third party vendors. The general idea is that they communicate the consent to the page and then the page owners communicate that consent to the rest of involved parties.
Gtag has nothing to do with this all and you probably don't need the measurement ids you've collected. At least not for the purposes of privacy.
Normally, a CMP would aim for using window.dataLayer. It will push the consent into the dataLayer once the consent is known. It will also typically issue a JS event with the consent in the details.
Alternatively, CMPs will almost always maintain cookies that would indicate the fact that the consent was given as well as the details of that consent.
As a widget included in the site (unless you're an iframe), you should be able to see the local cookies and local window.
If you are an iframe indeed then it's more difficult. I would just ask the front-end to pass you the consent in a query param.
Upvotes: 0