GTM

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.

How To Configure Facebook Pixel for CCPA Compliance on Shopify

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:

ccpa-compliance-email-facebook

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:

  1. annual revenue > $25 million OR
  2. 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:

  1. They will auto-apply a limited data collection for California visitors automatically for your pixel starting July 1st
  2. The goal is to try and meet the CCPA regulations to give you time to update your pixel to comply
  3. You can implement a process to your tracking pixel to opt-out when users submit their opt-out CCPA submission on your website
  4. 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.

ccpa-step2

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.

ccpa-step3

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.

ccpa-step4

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:

ccpa-step5

and here is what it looks like if configured in FB Tag:

ccpa-step6

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:

ccpa variables

That’s it.

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!.

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.

Get Exclusive Elevar Insights directly to your inbox.

Get free analytics tips and resources delivered directly to your inbox.

Facebook Conversions API Setup

Join our server side tagging challenge to launch your FB conversion API integration.

Learn More

Brad Redding

Brad, co-founder of Elevar, has lived in eCommerce for over 12 years. He's helped design, build, and optimize over 100 websites in his career. From new retail startups to well-known brands like Le Creuset, Signature Hardware, Rebecca Minkoff, Char-Broil and more, he specializes in data analytics and conversion optimization to help achieve business goals.

  1. How much would it cost to have you guys just do the CCPA integration for me?

    We bought one of your products specifically to be able to do this and the info is a bit limited.

  2. Hi,
    So I have the Facebook pixel implemented as a stand alone in my Shopify store.
    According to Shopify help centre, you can’t use GTM this way.
    Do you have a solution that is not based on GTM?

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles