From e4750786b1bc27ca5e90642f159602ca0a3f762c Mon Sep 17 00:00:00 2001 From: Ruchira Date: Thu, 10 Jun 2021 19:28:04 +0530 Subject: [PATCH 1/2] fb pixel custom event fix --- integrations/FacebookPixel/browser.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/integrations/FacebookPixel/browser.js b/integrations/FacebookPixel/browser.js index b1a40c5d93..32880646d6 100644 --- a/integrations/FacebookPixel/browser.js +++ b/integrations/FacebookPixel/browser.js @@ -111,6 +111,13 @@ class FacebookPixel { return filtered; }, []); + if (![].concat(standard, legacy).length) { + window.fbq("trackSingleCustom", self.pixelId, event, payload, { + eventID: rudderElement.message.messageId, + }); + return; + } + each((event) => { payload.currency = rudderElement.message.properties.currency || "USD"; From 12b6f6e02ae0c24197b127276883ef98f5955e34 Mon Sep 17 00:00:00 2001 From: Ruchira Date: Thu, 10 Jun 2021 19:30:05 +0530 Subject: [PATCH 2/2] changed variable name --- integrations/FacebookPixel/browser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/FacebookPixel/browser.js b/integrations/FacebookPixel/browser.js index 32880646d6..0067918718 100644 --- a/integrations/FacebookPixel/browser.js +++ b/integrations/FacebookPixel/browser.js @@ -111,7 +111,7 @@ class FacebookPixel { return filtered; }, []); - if (![].concat(standard, legacy).length) { + if (![].concat(standardTo, legacyTo).length) { window.fbq("trackSingleCustom", self.pixelId, event, payload, { eventID: rudderElement.message.messageId, });