Meta Pixel Helper extension keeps on showing the warnings

Meta Pixel Helper extension keeps on showing the warnings

BaoJay
Shopify Partner
5 1 0

Hi guys,
I'm applying the Meta pixel to track on Checkout page, by adding Custom pixel in Settings > Customer events these code:

// Step 1. Initialize the JavaScript pixel SDK (make sure to exclude HTML)
!(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.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", "1796727657413629"); // My Pixel ID


// Step 2. Only define and subscribe to the event on the Checkout page
analytics.subscribe("checkout_started", async (event) => {
console.log('Event triggered: checkout_started');
const currentPathname = event?.context?.document?.location?.pathname;

if (currentPathname.includes('/checkouts')) {
console.log('Event is for Checkout Page');
fbq('track', 'InitiateCheckout', {data: "testing"});
}
});
The Meta pixel works fine, it tracks the Checkout page when the event checkout_started fires. But the issue is Meta Pixel Helper extension keeps on showing the warnings on the other pages, which is confused for client and customer. 
 
On the other pages, Meta Pixel Helper shows this warnings
 
BaoJay_1-1724208245760.png

 

But in the Checkout page, everything works fine. The Meta Pixel Helper shows correctly.
BaoJay_2-1724208282206.png

 

 

The fbq function seems to execute on every page which is not the thing i want.

My question is how to get rid of the `InitiateCheckout` warning on Meta Pixel Helper on other pages?

 

 

 

I'm a passionate Shopify Theme Developer, weaving seamless and stunning digital experiences for e-commerce ventures.
Replies 2 (2)

ceaksan
Visitor
1 0 0

The issue is related to the Pixel Helper, not the Meta Pixel event data flow, so you can ignore it. Pixel Helper captures events if they are defined with fbq and lists them in the “found” list, but this doesn’t necessarily mean the event has fired, it’s just informational.

Sam_Mahmud
Shopify Partner
182 4 9

Hello Baojay,

configure your checkout event from Google tag Manager. 

 

hopefully it is going to be solved.


THanks

Your COFFEE TIP! Can Create something incredible!
Require Assistance with website design or enhanced conversion tracking ?
sam.analyst4@gmail.com! or WhatsApp!
Solved? accept it as solution with like