> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.consentmo.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 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](https://support.consentmo.com/en/article/facebook-pixel-integration-for-consentmo-gdpr-app-1k88uvz/?bust=1692712775671) 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:

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

```javascript
<script>
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);
</script>
```

7. Click on the **Save** button.
8. That's it!
  
||| **NOTE: ** ${color}[#476DA5](Make sure to remove the added code before deleting the app. This way, no snippets of code will be left in your theme. For more information on what you should be aware of when deleting our app check [this article](/en/article/uninstalling-the-consentmo-app-1t7juar/) of our FAQ page.)

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

${youtube}[How to implement the Facebook Flag for LDU](87ETbCaCUEw)