examples
<!– Facebook Conversion Event: View Content –>
<script>
fbq(‘track’, ‘ViewContent’, {
value: 0.10,
currency: ‘USD’,
content_name: ‘Content Name’,
content_type: ‘product’, // Required for Dynamic Product Ads
content_ids: ‘woo-123’ // Required for Dynamic Product Ads
});
</script>
<!– Facebook Conversion Event: Search –>
<script>
var searchString = document.getElementsByClassName(‘search-field’)[0].value;
fbq(‘track’, ‘Search’, {
value: 0.10,
currency: ‘USD’,
content_category: ‘snippets’,
content_ids: ‘woo-123’,
search_string: searchString
});
</script>
<script>
fbq(‘track’, ‘AddToCart’, {
value: 10.00,
currency: ‘USD’,
content_name: ‘Product Name’,
content_type: ‘product’, // Required for Dynamic Product Ads
content_ids: ‘woo-123’ // Required for Dynamic Product Ads
});
</script>
<!– Facebook Conversion Event: Initiate Checkout –>
<script>
fbq(‘track’, ‘InitiateCheckout’, {
value: 0.10,
currency: ‘USD’,
content_name: ‘Checkout’,
content_category: ‘snippets’,
content_ids: ‘woo-123’,
num_ids: 1
});
</script>
<script>
fbq(‘track’, ‘AddPaymentInfo’, {
value: 0.10,
currency: ‘USD’,
content_category: ‘snippets’,
content_ids: ‘woo-123’
});
</script>
<!– Facebook Conversion Event: Purchase –>
<script>
fbq(‘track’, ‘Purchase’, {
value: 10.00,
currency: ‘USD’,
content_name: ‘Product Name’,
content_type: ‘product’,
content_ids: ‘woo-123’,
num_items: 1
});
</script>