Pixel Activated Multiple Times for Facebook Pixel Tracking

纵然是瞬间 提交于 2020-01-14 07:41:06

问题


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>

回答1:


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



来源:https://stackoverflow.com/questions/30849944/pixel-activated-multiple-times-for-facebook-pixel-tracking

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!