jul*_*jul 5 javascript analytics facebook
有没有办法在初始化 Facebook Pixel 实例后以编程方式删除它fbq('init', 'XXXXXXXXXXXXX')?
Google Analytics.js 允许使用 删除单个跟踪器对象ga('[trackerName.]remove'),但我在全局 fbq 对象上找不到任何具有类似功能的方法。
更新:虽然并不理想,但解决方法是仅针对特定像素,如下所示:
fbq('init', '<PIXEL_A>');
fbq('init', '<PIXEL_B>');
fbq('track', 'PageView'); //fire PageView for both initialized pixels
// only fire the Purchase event for Pixel A
fbq('trackSingle', '<PIXEL_A>', 'Purchase', {
value: 4,
currency: 'GBP',
});
// only fire the custom event Step4 for Pixel B
fbq('trackSingleCustom', '<PIXEL_B>', 'Step4',{
//optional parameters
});```
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2378 次 |
| 最近记录: |