FB Pixel upfront consent


Hi everybody,

I was wondering how to implement following use case:

  1. User arrives on webpage and a PopUp is shown
  2. The PopUp shows 2 buttnos and a text asking if the user agrees on the tracking with FB Pixel
  3. IF user clicks on agree button: Starts fb pixel
  4. IF user clicks no button: No tracking

Is there an easy way to implement this?

Thanks


2 replies

Userlevel 7
Badge +3

Hey @Ynoooos,

In order to do what you are after, you’ll need to write some custom JS that would “listen” for the button clicks and either fire the FB pixel or it won’t fire it.

Now, popups are usually loaded as iFrames so you would also have to take that into consideration as well when writing the JS script. The parent page would need to be able to communicate with the iFrame.

Is it easy? It really depends on how comfortable you are with writing JS and with the above logic that the script needs to follow.

Best,
Hristian

Hi,

Thanks for the quick answer. Do you have any Tutorial on this?

Thanks

Reply