For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
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"}); } });
My question is how to get rid of the `InitiateCheckout` warning on Meta Pixel Helper on other pages?
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.
Hello Baojay,
configure your checkout event from Google tag Manager.
hopefully it is going to be solved.
THanks