Meta PIXEL Finsweet Cookie Consent - Does not work

I have successfully set up the Meta Pixel on my Webflow site by inserting the pixel code directly in the site settings (in the Custom Code section). With this configuration, all events—including PageView and custom events—are properly received by Meta Ads.

However, when I follow Finsweet’s instructions for GDPR compliance and remove the Meta Pixel code from the Webflow site settings to replace it with their managed code (as shown below), Meta Ads fails to receive any events beyond the basic PageView, even when users accept the GDPR consent.

Here is the Finsweet-managed Meta Pixel code that I am using:

<!-- This script is managed by Finsweet Cookie Consent -->
<script type="fs-consent" fs-consent-categories="essential,marketing,personalization,analytics" fs-consent-scripttype="text/javascript">
  !function(f,b,e,v,n,t,s){
    if(f.fbq)return;
    n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};
    if(!f._fbq)f._fbq=n;
    n.push=n;
    n.loaded=!0;
    n.version='2.0';
    n.agent='plwebflow';
    n.queue=[];
    t=b.createElement(e);
    t.async=!0;
    t.src=v;
    s=b.getElementsByTagName(e)[0];
    s.parentNode.insertBefore(t,s)
  }(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
  fbq('consent', 'revoke');
  fbq('init', '1416098999743466');
  fbq('track', 'PageView');
</script>

When I use this code managed by Finsweet, Meta Ads does not trigger any further events (such as custom events) on my page—even though the GDPR consent is accepted. The Meta Pixel Helper only shows the PageView event.

Site URL

Steps to Reproduce

  1. Without Finsweet Code:
  • Insert the Meta Pixel code directly into Webflow’s Custom Code settings.
  • Verify in Meta Ads Manager that events (including custom ones) are correctly received.
  1. With Finsweet Code:
  • Remove the direct Meta Pixel code from Webflow’s site settings.
  • Insert the Finsweet-managed Meta Pixel code (as shown above) in the header of the site.
  • Publish the site and confirm that, despite accepting GDPR consents, only PageView events are being received by Meta Ads.

Expected Behavior

I expect that using the Finsweet-managed code for GDPR compliance should still allow Meta Ads to receive all events (both PageView and custom events like those triggered by button clicks) exactly as when the pixel code is directly inserted via Webflow’s site settings.

Actual Behavior

When I use Finsweet’s managed code (and remove the direct Meta Pixel code), Meta Ads only records PageView events. No additional events (such as custom events triggered on button clicks) are being received, even after users accept the GDPR consent.

Video/Screenshots

Required:

  • Video links (I conly only put two links in this post, so I add spaces):
  • when Meta PIXEL does NOT work : youtu . be/BQJpSkQqtaE?si=chmVG8aFK_MzqvVM
  • when Meta PIXEL does work part1 : youtu . be/gx8yThRGa6Q?si=YSx1SLN15Zz5LyUy
  • part2 : youtu . be/_BiAmRx8M4I?si=U_owABpKuPRVEnpg
  • Screenshots (if applicable):

Additional Context

  • Browser: Chrome 120
  • Device: Desktop
  • This issue only occurs when using the Finsweet Cookie Consent module for GDPR compliance. When the Meta Pixel code is inserted directly in the Webflow site settings, all events are captured as expected.

Thank you in advance for your help and feedback!

Hey @f.schneider!

The issue comes from a line within the Meta Pixel code. With how the scripts are triggered, this line revokes all previously granted consent:

fbq('consent', 'revoke');

This means Meta will stop tracking events for that user session.
You can simply remove this line from the script, and all events will continue to be tracked as expected.

This code has had that line removed, in case you want to copy/paste it into the site settings :slight_smile:

<!-- This script is managed by Finsweet Cookie Consent -->
<script type="fs-consent" fs-consent-categories="essential,marketing,personalization,analytics" fs-consent-scripttype="text/javascript">
  !function(f,b,e,v,n,t,s){
    if(f.fbq)return;
    n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};
    if(!f._fbq)f._fbq=n;
    n.push=n;
    n.loaded=!0;
    n.version='2.0';
    n.agent='plwebflow';
    n.queue=[];
    t=b.createElement(e);
    t.async=!0;
    t.src=v;
    s=b.getElementsByTagName(e)[0];
    s.parentNode.insertBefore(t,s)
  }(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', '1416098999743466');
  fbq('track', 'PageView');
</script>

Let me know if this helps!

Thank you so much for your kind help.

It seems that it works correctly.

However, there is two things I don’t understand.

  1. The Meta Pixel is here to track the user. Finsweet Cookie Consent is here to let the user choose wether or not their datas are being tracked anymore. Is removing this line still let them choose?
  2. Why do I have to remove it myself, why isn’t the Finsweet Component suggestion’s code removing it directly?

Best Regards and thank you so much again.

Great questions!

The line fbq('consent', 'revoke') tells Meta (Facebook) that no consent has been given yet and disables tracking until fbq('consent', 'grant') is called.

However, since Finsweet Cookie Consent prevents this script from running until the user accepts the relevant cookie category (like “marketing”), this line isn’t technically necessary — if the user denies consent, the script won’t run at all, and no tracking occurs.

We have not implemented an automatic removal yet, I’ll discuss this with the team so we can see if we can do something and push an update to the app. Thank you for the suggestion!

1 Like