我正在爲我的客戶之一,它需要跟蹤用戶誰添加項目購物車,並沒有購買它.. 該網站使用BigCommerce,所以添加到購物車是在頁面上動態執行而不移動到下一頁。Facebook AddTOCart像素沒有引發點擊事件
這裏是AddtoCart
<div class="form-action">
<input id="form-action-addToCart" data-wait-message="Adding to cart…" class="button button--primary" type="submit" value="Add to Cart">
</div>
而對於Facebook像素代碼:
<!-- Add Pixel Events to the button's click handler -->
<script type="text/javascript">
$('#form-action-addToCart').click(function() {
fbq('track', 'AddToCart', {
content_name: 'Really Fast Running Shoes',
content_category: 'Apparel & Accessories > Shoes',
content_ids: ['1234'],
content_type: 'product',
value: 4.99,
currency: 'USD'
});
});
</script>
此外,試圖用$('#輸入外形行動addToCart「),但像素沒有得到解僱..我使用Facebook的官方像素Chrome擴展...
需要回答,請調查一下。 http://stackoverflow.com/questions/41036938/do-we-need-to-explyly-check-that-user-is-coming-from-facebook-or-not – VBMali
我自己修復了它,無論如何謝謝 – Srinivas08