Articles on: Frequently Asked Questions (FAQ)

Facebook Flag for Limited Data Use (LDU)

Facebook has recently released a Limited Data Use feature, which will give businesses more control over how their data is used in Facebook's systems. In order for the feature to function, a LDU flag has to be set once a customer opts-out of the Marketing cookie group.

The flag indicates that Facebook should limit the use of the customer's personal data. The signal is sent through an array called Data Processing Options. This rule should apply for customers from California only.

The implementation of the flag in our app will happen in the following way: We have created a script which will be triggered once the visitor opts-out from the marketing cookies. The script will set the flag in regard to the LDU.

NOTE: Check this Article if you would like to fully disable the Facebook Pixel for all the visitors who opt out from the marketing cookies.

Here are instructions on how to implement the script:

Open Shopify Admin.
Click on Online Store link in the left menubar.
Click on the "**Action**" dropdown button and select Edit Code from there.
A new page will open with a list of files on the left side of the screen. Open the theme.liquid file.
Find the string </head> in there.
When you do, add the following snippet before </head>:

var iac=(document.cookie.match(/^(?:.\*;)?\\s\*cookieconsent\_preferences\_disabled\\s\*=\\s\*(\[^;\]+)(?:.\*)?$/)
||\[,null\])\[1\];null!=iac&&iac.indexOf("marketing")>=0&&"function"==typeof fbq&&fbq("dataProcessingOptions",\["LDU"\],0,0);

Click on the Save button.
That's it!

NOTE: We have also recorded a video on how you can do this by following our steps. You can find it below:

Updated on: 12/10/2023

Was this article helpful?

Share your feedback


Thank you!