Coder Social home page Coder Social logo

gatsby-plugin-facebook-pixel's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatsby-plugin-facebook-pixel's Issues

Gatsby-plugin-offline

Hi, is your plugin compatible with Gatsby plugin offline?

I see this in console after installation

StaleWhileRevalidate.mjs:168 Uncaught (in promise) no-response: no-response :: [{"url":"https://connect.facebook.net/en_US/fbevents.js","error":{}}]
    at o.makeRequest (https://DOMAIN/workbox-v4.3.1/workbox-strategies.prod.js:1:3983)

(index):10 GET https://connect.facebook.net/en_US/fbevents.js net::ERR_FAILED
(anonymous) @ (index):10

GDPR compliance

The facebook pixel is considered a marketing cookie and as such the visitor should not be opted in by default.

Is there a way to have this not fire anything until a specific cookie is set, similar to how gatsby-plugin-google-analytics-gdpr works?

Should the Facebook Pixel Helper extension be registering the pixel?

I've npm installed the plugin and updated my gatsby-config.js as outlined in the Readme. I've also installed the Facebook Pixel Helper Extension in my browser. However, I've not seeing any hits on it.

Using the react-facebook-pixel package seems to register the FB Pixel in the extension however.

Is there anything that is required?

I want to use my own ViewContent

I want to use my own ViewContent event. how do I disable the internal view content event that the plugin has? for instance I am doing this for my ViewContent with your plugin

fbTrack('track', 'ViewContent', {
      value: currentVariant.price,
      currency: 'USD',
      content_type: 'product',
      content_ids: currentVariant.sku,
    });

But I see the plugin is doing it is own recording for that same event what should I do?

and also what content_ids is that event using?

Should ViewContent be triggered on every route change?

From the facebook pixel spec ViewContent is defined as:

A visit to a content page you care about (for example, a product page or landing page). View Content tells you if someone visits a web page, but not what they do on that web page.

The fact that it triggers on every route change makes it pretty much equal the PageView events. Do you think this is the desired behaviour?
Thanks!

Example of binding a fbq event to a click

Hey, thanks for the plugin, it's working perfectly. However, I want to bind a fbq event to a button click but unsure how to do this, it works fine for me in production but locally my components obviously have no idea what fbq is. Could you share an example of how to get around this?

simply doing this:

contactClick = () => {
    fbq('track', 'Contact')
  }

and binding it to a click event works fine when the site is built, just breaks locally as it doesn't know what fbq is

Thanks in advance,
San

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.