Giter VIP home page Giter VIP logo

Comments (3)

antony avatar antony commented on July 20, 2024

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.

benwoodward avatar benwoodward commented on July 20, 2024

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.

dextermb avatar dextermb commented on July 20, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.