像素激活多次Facebook像素跟踪 [英] Pixel Activated Multiple Times for Facebook Pixel Tracking

查看:755
本文介绍了像素激活多次Facebook像素跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用从Facebook获得的一些Javascript来执行跟踪像素。但是当我使用Facebook Pixel Helper来查看事物是否正常工作时,它表示出现错误,并且像素被激活了多次。它没有指示如何解决这样的错误,甚至在哪里看。是否有可以从Facebook的这个代码中改变,这将阻止这种多次触发?

 < script> 
(function(){
var _fbq = window._fbq ||(window._fbq = []);
if(!_fbq.loaded){
var fbds = document .createElement('script');
fbds.async = true;
fbds.src ='//connect.facebook.net/en_US/fbds.js';
var s =文档.getElementsByTagName('script')[0];
s.parentNode.insertBefore(fbds,s);
_fbq.loaded = true;
}
_fbq.push([ 'addPixelId','368842449990820']);
})();

window._fbq = window._fbq || [];
window._fbq.push(['track','PixelInitialized',{}]);
< / script>
< noscript>
< img height =1width =1alt =style =display:nonesrc =https://www.facebook.com/tr?id=368842449990820&amp;ev = PixelInitialized/>
< / noscript>


解决方案

Facebook Pixel Helper有时导致这种错误的延伸。他们今天更新,所以您可以通过更新到最新版本的扩展名来修复错误。



https://chrome.google.com/webstore/detail/fb-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc


I am using some Javascript I got from Facebook to execute a "tracking" pixel. But when I use the "Facebook Pixel Helper" to see if things are working correctly, it indicates there is an error, and the pixel is being activated multiple times. It gives no instructions on how to resolve such an error, or even where to look. Are there changes I can make in this code from Facebook that would prevent this multiple firing?

 <script>
    (function() {
        var _fbq = window._fbq || (window._fbq = []);
        if (!_fbq.loaded) {
            var fbds = document.createElement('script');
            fbds.async = true;
            fbds.src = '//connect.facebook.net/en_US/fbds.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(fbds, s);
            _fbq.loaded = true;
        }
        _fbq.push(['addPixelId', '368842449990820']);
    })();

    window._fbq = window._fbq || [];
    window._fbq.push(['track', 'PixelInitialized', {}]);
</script>
<noscript>
    <img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=368842449990820&amp;ev=PixelInitialized" />
</noscript>

解决方案

There was a bug in the "Facebook Pixel Helper" extension that sometimes led to this error. They updated it today so you may be able to fix the error simply by updating to the latest version of the extension.

https://chrome.google.com/webstore/detail/fb-pixel-helper/fdgfkebogiimcoedlicjlajpkdmockpc

这篇关于像素激活多次Facebook像素跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆