Comments (3)
I think you're getting the issue that has already been raised here: #2
However, we use this in production so I'm a bit confused as to why it wouldn't work.
I'll have a poke around soon and see if they've updated their API or something and broken it. Facebook are abysmal at API versioning, or APIs in general.
from svelte-facebook-pixel.
I found that I needed to use fb.enable()
for it to work, because by default it doesn't initialise itself. However, I am getting the same issue mentioned in #2 about Duplicate Pixel ID. Have only tested in dev so far, will update if problem persists in production.
EDIT: I'm guessing that it's due to this line: https://github.com/beyonk-adventures/svelte-facebook-pixel/blob/2b33a1eb3b137df36d807cc5678f59a9b5029c83/src/FacebookPixel.svelte#L49
If you call fb.enable()
that in turns calls mount()
, and init()
, and mount()
calls enable()
on the line linked above, which means that init()
ends up getting called twice if you call enable()
.. I think
EDIT: Made a PR to fix the issue: #5
from svelte-facebook-pixel.
Hi, I've responded to #5. We're looking at refactoring over the next couple of days which should resolve this.
from svelte-facebook-pixel.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svelte-facebook-pixel.