Articles on: Integrations

Facebook Pixel integration for Consentmo GDPR app

Here is how it works by default:

Our app deletes the Facebook Pixel cookies on page load. However, those cookies are then created by Facebook again on the next page load. Because of that, we are removing the cookies on every refresh. With that said, when a customer visits a page, a small bit of information is sent to Facebook Pixel. We are using this method due to Shopify's limitations preventing us from getting the tracking codes for each store.

NOTE: The below integration is only applicable if the service is added via a script placed in the theme files of the store. If the integration for the service is done through any other channel or service, please check the Help center for the relevant integration as per your case: Social Media Pixels integration for Consentmo GDPR app

Enabling of the Facebook Pixel's integration script

The process for initial manual integration for Facebook Pixel, is the following:



Open Shopify Admin.

Click on Online Store link in the left menubar.

Click on the Actions 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.

Create a new liquid file in the Snippets section of the theme files, called facebook-pixel-integration-script

After that copy the content of the integration script provided below and paste it in the newly created Snippet file:

Download Facebook Pixel integration script

Locate the original Facebook Pixel script and do the following:

Step 1. Copy the content of the Facebook Pixel script and paste it under the line “// The content of Facebook Pixel script goes here” in the integration script again

Step 2. Comment out or delete the original Facebook Pixel scripts and save the changes.

Open the theme.liquid file.

Locate the opening <head> tag and after it, add the following line of code:

<!-- Facebook Pixel integration script Consentmo -->
{% render 'facebook-pixel-integration-script' %}


A reference on the process can also be checked here:





NOTE: 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 of our FAQ page.

In case you need any further assistance with the integration setup, please reach out to our support at support@consentmo.com or via our live chat.

Updated on: 06/11/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!