然后,我使用如下代码触发事件。
<body>
...
<script>
fbq('track', 'ViewContent', {
content_type: 'product',
content_ids: ['1234'],
content_name: 'ABC Leather Sandal',
content_category: 'Shoes',
value: 0.50,
currency: 'USD'
});
</script>
</body>
但是当代码被执行时,我会遇到一个错误,因为Facebook Pixel是异步加载的,而且fbq还不可用。
Uncaught ReferenceError: fbq is not defined
我该怎么办?