From 48cf868f416494984b8bd6301e343810d04aa4d3 Mon Sep 17 00:00:00 2001 From: Alexandre Bacco Date: Thu, 29 Oct 2026 15:36:55 +0100 Subject: [PATCH] feat(facebookpixel): add facebookpixelOpenBridge option Lets the Meta Pixel send its events to a Conversions API Gateway endpoint. The openbridge setting has to be applied before fbq('init'), which the existing facebookpixelMore hook (called after init and PageView) cannot do. Co-Authored-By: Claude Sonnet 5.5 --- tarteaucitron.services.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index c860fc08..9587f24a 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -5774,6 +5774,10 @@ tarteaucitron.services.facebookpixel = { n.version = '2.0'; n.queue = []; tarteaucitron.addScript('https://connect.facebook.net/en_US/fbevents.js'); + // Must be set before init, otherwise the pixel never loads the Conversions API Gateway plugin + if (typeof tarteaucitron.user.facebookpixelOpenBridge === 'string') { + fbq('set', 'openbridge', tarteaucitron.user.facebookpixelId, tarteaucitron.user.facebookpixelOpenBridge); + } fbq('init', tarteaucitron.user.facebookpixelId); fbq('track', 'PageView');