馃啋 Your use case
Thanks again for Nuxt Scripts. We send Meta PageView events from both the browser pixel and the Conversions API and want Meta to deduplicate them, which needs the same eventID on both.
useScriptMetaPixel always queues fbq('track', 'PageView') in clientInit. fbevents keeps only the first PageView per pixel on a page, so our own fbq('track', 'PageView', {}, { eventID }) is dropped, and the browser event never carries the ID.
馃啎 The solution you'd like
A trackPageView option on the Meta Pixel registry, like the TikTok Pixel one, defaulting to true:
const { proxy } = useScriptMetaPixel({ id: 'YOUR_PIXEL_ID', trackPageView: false })
proxy.fbq('track', 'PageView', {}, { eventID: 'shared-with-capi' })
馃攳 Alternatives you've considered
fbq('set', 'autoConfig', false, id) and fbq.disablePushState = true cover fbevents' automatic events and SPA history page views, not the PageView the stub queues.
- Removing the queued
PageView from window.fbq.queue ourselves works, but it depends on the stub's internals.
鈩癸笍 Additional info
We have a small PR ready (option, docs section, registry types, and a test) if this sounds reasonable.
I investigated this with help from an AI coding assistant (Claude Code), which also drafted this text. I reviewed it, and the results above come from real runs.
馃啋 Your use case
Thanks again for Nuxt Scripts. We send Meta
PageViewevents from both the browser pixel and the Conversions API and want Meta to deduplicate them, which needs the sameeventIDon both.useScriptMetaPixelalways queuesfbq('track', 'PageView')inclientInit. fbevents keeps only the firstPageViewper pixel on a page, so our ownfbq('track', 'PageView', {}, { eventID })is dropped, and the browser event never carries the ID.馃啎 The solution you'd like
A
trackPageViewoption on the Meta Pixel registry, like the TikTok Pixel one, defaulting totrue:馃攳 Alternatives you've considered
fbq('set', 'autoConfig', false, id)andfbq.disablePushState = truecover fbevents' automatic events and SPA history page views, not thePageViewthe stub queues.PageViewfromwindow.fbq.queueourselves works, but it depends on the stub's internals.鈩癸笍 Additional info
We have a small PR ready (option, docs section, registry types, and a test) if this sounds reasonable.
I investigated this with help from an AI coding assistant (Claude Code), which also drafted this text. I reviewed it, and the results above come from real runs.