javascriptphphtmlfacebook-pixel

How to get rid of this Facebook Pixel Warning?


I've been searching for a week now and didn't find any solution for this warning, the warning is:

WARNINGS

" We detected event code but the pixel has not activated for this event, so no information was sent to Facebook. This could be due to an error in the code, but could also occur if the pixel fires on a dynamic event such as a button click.Learn more "

And pixel code is: fbq('track', 'PageView');

My code:

 !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');    
  fbq('consent', 'revoke');   
  fbq('init', /* PIXEL_ID */);
  fbq('track', 'PageView');   
  fbq('consent', 'grant');  

Please help me to understand what exactly the problem could be and possible solution for it.


Solution

  • Try to disable AdBlock (this is what works for me)

    With active AdBlock:

    enter image description here

    With deactivated AdBlock:

    enter image description here