我有一个单页的
javascript应用程序,我试图用新的Facebook Pixel实现
Advanced Matching,以便我们更好地归因于我们的广告.
我们当前首次加载应用时启动FB像素,然后根据应用中的用户行为触发标准曲目事件,例如用户完成订单时购买.
下面简要介绍了正在发生的事情……
// App loads // URL: xxxx.com/[client]/ !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js'); // Pixel Initialised // we don't know any user details at this stage fbq('init','[PIXELID]'); fbq('track','PageView'); // User selects the event they want to purchase tickets from // URL: xxxx.com/[client]/event/[productid]/ fbq('track','PageView'); fbq('track','ViewContent',{ content_name: 'Store',content_ids: '[productid]',content_type: 'product_group' }); // User goes through rest of purchase process // More Standard Events sent,e.g. Add To Cart // User completes purchase // URL: xxxx.com/[client]/order/completed/ // At this point we now know email address,name & phone,but pixel is already initialised. How do we do Advanced Matching? fbq('track','Purchase',{ content_type: 'Store',value: 75.00,currency: 'USD',num_items: 4,order_id: '20160710090000',});
高级匹配建议在初始化像素时设置字段.但是,由于我们仅在应用程序加载时初始化像素一次(当我们不知道任何用户详细信息时),我不确定如何实现高级匹配.再次初始化相同的像素会引发错误,并且似乎没有办法在轨道事件中传递高级匹配字段或重新初始化像素.
有没有人在单页js应用程序中使用高级匹配成功?