gpt4 book ai didi

javascript - 如何摆脱这个 Facebook 像素警告?

转载 作者:行者123 更新时间:2023-11-30 14:08:03 33 4
gpt4 key购买 nike

我已经搜索了一个星期,但没有找到针对此警告的任何解决方案,警告是:

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 "

像素代码为:fbq('track', 'PageView');

我的代码:

 !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');

请帮助我了解问题到底是什么以及可能的解决方案。

最佳答案

尝试禁用 AdBlock(这对我有用)

使用事件 AdBlock:

enter image description here

停用 AdBlock:

enter image description here

关于javascript - 如何摆脱这个 Facebook 像素警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55015104/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com