zsajjad / react-facebook-pixel

React JS wrapper for Facebook's Pixel
MIT License
233 stars 86 forks source link

Pixel fires for the first time, wont fire after normal refresh, but fires again after hard refresh. #86

Closed niraj-khatiwada closed 3 years ago

niraj-khatiwada commented 3 years ago

So recently I found out that one of my sites Facebook Pixel fires for the first load of app but wont fire again after multiple refresh, and fires again after hard refresh. Urgent help needed. Video for reference.(The last refresh is the hard refresh)

https://user-images.githubusercontent.com/51436631/121505895-f25f2880-ca02-11eb-923d-09cda638b78b.mp4

niraj-khatiwada commented 3 years ago

Ok turns out if some serviceWorker is registered for coverting React App to make PWA, it will store the cache that prevents the pixel firing.

jsudung commented 3 years ago

Ok turns out if some serviceWorker is registered for coverting React App to make PWA, it will store the cache that prevents the pixel firing.

Were you able to work around this with PWA enabled?

niraj-khatiwada commented 3 years ago

Ok turns out if some serviceWorker is registered for coverting React App to make PWA, it will store the cache that prevents the pixel firing.

Were you able to work around this with PWA enabled?

Actually no. I ditched PWA support to fix facebook pixel to meet client expectations. Good luck.