How would I put multiple Facebook tracking pixels on one web page?

后端 未结 7 1152
情书的邮戳
情书的邮戳 2020-12-30 11:36

We are trying to use Facebook\'s Ad tracking pixels to track ads. we looked at Facebook\'s documentation and that led me no where.

I need to know how to trigger mult

7条回答
  •  清歌不尽
    2020-12-30 11:55

    I was running into the same problem and I couldn't find the solution anywhere. I dug into the code and found a method you can used called "addPixelId". In my testing, you can use this right after the "init", which will add a second ID. Any events you track will now send to both IDs. For example:

    fbq('init', 'xxxxxxxxxxxxx12');
    fbq('addPixelId', 'xxxxxxxxxxxxx34');
    fbq('addPixelId', 'xxxxxxxxxxxxx56');
    fbq('track', 'PageView');
    

    The only other thing to be aware of is any events you track will be tracked for all IDs that you have defined. It's been working fantastic for me, no issues whatsoever.

提交回复
热议问题