Open asheba opened 4 years ago
@zsajjad Any chance to review + merge this one? It's just passing another argument 🙏
@zsajjad I too would love to see this PR merged
I sadly just removed this library because it didn't support passing the eventId for deduplication, eventually leading me to this thread/PR.
You should really add this, it's gamebreaking to be able to pass the eventId to prevent duplication.
For the love of god, merge this commit plz
@martink-rsa did u use another package, how did u fix the issue ?
Hi @Vegeta-47 ,
I reverted to the manual way of setting it.
window.fbq("init", pixelId)
window.fbq("track", "PageView")
function fbPixel(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)
}
Later on I called it again with the id I needed to pass:
window.fbq("track", "Purchase", { value, currency }, { eventID: token })
Thanks for replying @martink-rsa, ill do the same
@zsajjad This was approved but never merged? Would you consider merging in and releasing pending PR's or sharing access to the repository so someone else can do it? I'd volunteer to help out if you are too busy.
We really need this third argument as de-duplication is really important these days. Another option would be spinning off a new package based on this one (our build platform is not accepting forks :/).
Why has this not been merged?
The
fbq
track function allows passing another JSON object argument with options - one of which,eventID
, is used for deduplication with server-side reporting.This is documented here: https://developers.facebook.com/docs/marketing-api/conversions-api/deduplicate-pixel-and-server-events