gabefromutah / gatsby-plugin-facebook-pixel Goto Github PK
View Code? Open in Web Editor NEWGatsby plugin to add facebook pixel onto a site
Gatsby plugin to add facebook pixel onto a site
Do you plan to add this feature?
Or could you please help me with an implementation without the plugin?
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
How can we add multiple pixels to a site? This is very common.
Is there a way to include facebook pixel standard events on specific pages?
I think, this should be optional, because can't test pixel without build whole project.
In accordance with CCPA, limited data use policy needs to be set prior to pixel initialization ('init' call)
More details about the technical aspects:
https://developers.facebook.com/docs/marketing-apis/data-processing-options
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?
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 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?
Hi!
Sorry potentially stupid question but I'm trying to use FB ads and synch my items with facebook. They require I pass them content ids: https://developers.facebook.com/docs/facebook-pixel/implementation/dynamic-ads/
How do I do that with this plugin? I have react-helmet installed and can populate the id of the item on each page but I'm very new to this and don't know how to forward that on to Facebook?
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!
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.