Category Archives: Pixels

Delayed Facebook Pixel Event

It’s easy to delay a Facebook pixel event.

Just have the event code away from the pixel, coded like this:

This code is running on this site and delays the Facebook ViewContent event by 30 seconds.

You can change the delay. The “30000” is the delay in milliseconds.

You’ll see the Facebook Pixel Helper complain about the event because it does not fire straight away.

That way you can build custom audiences of people who’ve been on your page for a decent amount of time.

(I’ve also used this to delay Facebook pixel events on scroll depth, button clicking, etc)

Hope it helps.

Facebook Pixel – Fire Purchase Event Only Once

I’ve seen quite a few people mention that they have problems with Facebook events. eg Purchase, lead, etc. firing more than once by a single visitor.

Either the page is refreshing (Stealth Seminar) or visitors are going to the “thank you page” repeatedly to get their digital download, check payments, etc.

This short piece of code uses a cookie to prevent the pixel from firing more than once in 10 days. If you want longer or shorter change the “10” in “10*24*60*60*1000” to the number of days you want.

Enjoy:

Test with the Facebook Pixel Helper (Chrome Plugin). If it doesn’t work for you then contact us.

PS make sure you run this code after the Facebook pixel has loaded. I normally put it in the footer.