admin管理员组文章数量:1297075
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','.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.
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/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.
Share edited Mar 6, 2019 at 9:21 user3307073 asked Mar 6, 2019 at 3:33 Prasad SuparePrasad Supare 481 silver badge8 bronze badges 6- how do you implement your Facebook Pixel in your HTML? – yqlim Commented Mar 6, 2019 at 3:37
- i've placed the code in the head tag – Prasad Supare Commented Mar 6, 2019 at 3:41
-
Show your code snippet. We can understand the context better if we can see something concrete. Based on the error message it is very likely that something in your code did not run, or you've placed
fbq('track', 'PageView')
incorrectly. – yqlim Commented Mar 6, 2019 at 3:44 - Sorry for that.. i've edited the question with the code now – Prasad Supare Commented Mar 6, 2019 at 3:49
- 1 You can try Pixel Helper to debug. – yqlim Commented Mar 6, 2019 at 3:53
1 Answer
Reset to default 11Try to disable AdBlock (this is what works for me)
With active AdBlock:
With deactivated AdBlock:
本文标签: javascriptHow to get rid of this Facebook Pixel WarningStack Overflow
版权声明:本文标题:javascript - How to get rid of this Facebook Pixel Warning? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741632732a2389461.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论