How To Configure CCPA for Facebook Browser Pixel and Conversion API using OneTrust
There are two options to configure your Facebook pixel to follow CCPA guidelines.
Option 1. Pass Facebook's limited data parameters if the user opts out on the site.
For general set up guidelines, view this article. The only step specific to OneTrust required here is in step 2 - when you trigger the HTML tag setting the "ccpaoptin" cookie. Step 1 would be completed by your OneTrust banner.
- First decide under what conditions you would like the limited data parameters sent to Facebook (example - if a user opts out of targeting cookies, or social media cookies, or both).
- Ensure you have the following variable created in your GTM container (this is included in OneTrust's template container).
- Next, create a new trigger. The below example will trigger if the user opted out of targeting cookies. You will need to adjust the highlighted portion depending on what you decided in step 1.
- Performance = C0002
- Functional = C0003
- Targeting = C0004
- Social Media = C0005
To pass LDU parameters if a user disables performance or targeting cookies, you could use a trigger like this:
To pass LDU parameters if a user disables performance and targeting cookies, you could use a trigger like this:
- Finally, add this trigger to your HTML tag setting the "ccpaoptin" cookie.
Option 2. Disable the browser pixel and server events completely if the user opts out on the site.
If you would rather prevent the events from being sent to Facebook completely when a user opts out, you will need to add exception triggers to your Facebook browser pixel and the "Facebook Server Side Events" tag in your GTM web container.
For example - if you decide to block the Facebook events if a user disables targeting cookies, you can use the below trigger as an exception trigger on all of the Facebook tags:
Example of the Server Events tag:
That's it!
Updated about 1 year ago