Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I call fbq('init') multiple times to use new pixel feature?

I want to use the new Facebook Ads Pixel feature where I can pass through my own information about a viewer when they're unmatched to the Facebook cookie.

However, I want to do this on a checkout page, which has fields for the user to enter in their name, address etc. They do this after the page has loaded, of course.

I can pull the information from the fields as the customer types, or once the person clicks on the buy button. However, is there going to be a problem running the fbq('init'...) function more than once? I'm assuming that if I don't include the init function straight away, it won't work with my standard event tracking (to track a page view etc), so I don't really want to delay it until they click on the button as I'll lose that other metric.

Alternatively, I could do this after they've provided their information on the next page that they see.

My questions ends up as; is there a problem calling fbq('init'...) more than once on a single page and will it work to send through that extra details about the customer if I do so?

like image 956
Marc Fowler Avatar asked Feb 20 '17 10:02

Marc Fowler


People also ask

Can I install more than one Facebook pixel on my website?

Recently, we worked with a client who asked us, “Can I install multiple Facebook Pixels on my website?” The short answer is yes, you can! The Facebook Pixel is a popular tool that you may already be using to send data to Facebook Ads.

Can you have multiple FB Pixels?

A lot of business owners sometimes wonder if they can have multiple Pixels installed in the same ad account. The short answer is, technically, yes. Facebook lets you create up to 100 pixels in your Business Manager account.


1 Answers

Yes, you can call init several times. Events will be sent to every pixels passed to init.

Source: https://developers.facebook.com/ads/blog/post/v2/2017/11/28/event-tracking-with-multiple-pixels-tracksingle/

like image 151
John B Avatar answered Oct 06 '22 18:10

John B