Facebook Custom Audience pixel on SinglePageApplication SPA

前端 未结 3 475
情话喂你
情话喂你 2021-02-09 22:59

I have a SinglePageApplication built with AngularJs. I want too add Facebook Custom Audience tracking pixel globally and update it manually every time user changes page (url). <

3条回答
  •  太阳男子
    2021-02-09 23:28

    I managed to resolve this by loading _fbq object:

    
    

    and then calling 'PixelInitialized' event every time page changes.

    $window._fbq.push(['track', 'PixelInitialized', {}]);
    

    Since then facebook correctly tracks my audiences.

提交回复
热议问题