How to fix Duplicate Facebook pixel ID error?

后端 未结 7 1885
暖寄归人
暖寄归人 2021-02-02 08:11

Added facebook pixel like they showed here here Now getting an error:

fbevents.js:9 Facebook Pixel Error: Duplicate Pixel ID: some-pixel-id

Canno

7条回答
  •  梦毁少年i
    2021-02-02 08:51

    You should simply check if fbq is undefined before calling init.

    if (typeof fbq === 'undefined') {
        fbq('init', 'your-pixel-ID');
    }
    

    Please note: don't wrap the full script with this if statement!

提交回复
热议问题