How To Configure Facebook Pixel for CCPA Compliance on Shopify
Learn how to set up CCPA compliance with your Facebook Pixel and Shopify store using Google Tag Manager.
Have you received an email from Facebook (or forwarded to you from a marketing partner) regarding CCPA compliance?
It might have looked something like this:
By now you have likely heard about CCPA (and GDPR).
CCPA enforcement went into effect on July 1st, 2020.
If you aren’t familiar with CCPA yet, Shopify has a great overview on CCPA which you can read about here.
In order for you to fall into the “realm of compliance” (i.e. you need to comply!), your business needs to meet one of the following conditions:
- annual revenue > $25 million OR
- 50,000 visitors from the state of California in a year
This # of visitors is a very small threshold.
You can get this # in Google Analytics > California users or Shopify to see where you stand – so double check to be safe.
Back to Facebook….
Their email outlined the steps they are taking to help with your own compliance timeline.
Essentially Facebook is stating:
- They will auto-apply a limited data collection for California visitors automatically for your pixel starting July 1st
- The goal is to try and meet the CCPA regulations to give you time to update your pixel to comply
- You can implement a process to your tracking pixel to opt-out when users submit their opt-out CCPA submission on your website
- After July 31st then they will require you (the pixel owner) to manage this data process collection for California users (e.g. if a user opts-out then limit the data sent with the pixel)
The good news is that we’ve been working with a few customers and Facebook on how to manage this…
…if you are leveraging Google Tag Manager to manage your Facebook pixel. This won’t work if you are using the built-in Shopify <> FB Pixel integration.
Please understand this is an example implementation that you can follow but does not guarantee your compliance. Every website and situation is unique.
Want CCPA + Facebook Implemented For You?
We’ve added this to our 1 year deal that includes done for you tagging & event tracking. Act now to reserve your spot.
How To Implement CCPA Compliance for Facebook and Shopify
You can follow the steps below to implement this solution for your own store (or sign up for one of our plans to have this done for you).
The steps to implement are essentially the following:
Step 1: Implement CCPA Form
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.
Step 2: Create HTML Tag in GTM
Set up HTML tag in GTM to set cookie if someone submits the CCPA form opting out.
Step 3: Add Variable to Grab Cookie
This step we just need to create a 1st party cookie variable to grab the cookie set in previous step.
Step 4: Update Email Variables if Opted Out
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.
Step 5: Update LDU (Limited Data Use) Variable
Currently we are setting this in a variable but you can also set directly in the Facebook tag.
In this example the variable is created to determine the LDU options for FB:
and here is what it looks like if configured in FB Tag:
Essentially we need to tell Facebook for the particular hit sent with their pixel if the data should be set up for limited use.
Step 5: Repeat for All PII Variables That Facebook/CCPA Covers
The example above was one variable<>tag example. But if you have others or are sending phone #, etc, then you may need to implement the same process for these tags as well.
Here’s an example that has 3 unique sets of email variables:
If you want to be sure you know when this implementation breaks (without you knowing it) then consider signing up for one of our tagging and monitoring plans.
We are the only Shopify Plus partner that specializes in tagging and we have a native monitoring solution built right into Google Tag Manager.
So when a tag, pixel, or variable breaks – we can be sure you know about it right away.
Schedule a call with us if you’d like to learn more about how we can automate this type of tag setup and monitoring for you.
Or if you want to talk specifically about CCPA.
Thanks and big shout out to our GTM guru Katie for this amazing solution!.
Looking for more Facebook tagging solutions? Try these:
Get Exclusive Elevar Insights directly to your inbox.
Get free analytics tips and resources delivered directly to your inbox.
Shopify + FB Conversion API
Launch sitewide Facebook Conversion API tracking via GTM in our 5 Day Server Side Tagging Challenge.Learn More