If you want to enable CCPA then the approach is:
- Create an opt-out CCPA form on your website following CCPA guidelines
- Create HTML tag within GTM to set a cookie if someone submits the CCPA form
- Add a 1st party cookie variable to grab the cookie
- Update email variables to pass an empty string if the user submitted the CCPA form
- Update all Facebook tags initializing the pixel to pass the processing option parameters
- Confirm your Conversion API setup supports CCPA
You need a CCPA form on your website that users can submit their request of info not being used.
Here is [one example](. Note: there many variations of this implementation.
Set up an HTML tag in GTM to set a cookie if someone submits the CCPA form opting out.
Create a 1st party cookie variable to grab the cookie set in the previous step.
In this step, you’ll need to create another set of email variables that are the custom JS type that reference the dataLayer variable(s) used for email collection.
You’ll need to create email variables in GTM to be something like the following below to pass an empty string if they’ve opted out.
So – if user opted-out then don’t include email. Otherwise include it.
These variables then need to be swapped out in the tag(s) that you were previously sending an email dataLayer variable to.
In all Facebook tags that initialize the pixel (the Sitewide and Purchase tags if you are using our templates), add the following lines before the init call:
Here is an example of it implemented:
Essentially we need to tell Facebook for the particular hit sent with their pixel if the data should be set up for limited use.
For the conversion API piece, you need to confirm two things:
- You are using our most up to date template for your server side GTM container (CCPA support was added 3/1/21). To confirm you have a template that supports CCPA, view the code of the "Facebook Server Side Events" template. You should see the following lines there:
- You are using "ccpaoptin" for your CCPA cookie in step two above.
That's it! With these two things in place, the templates will handle sending the data processing options based on the ccpa cookie.
Updated about 1 month ago