https://developers.facebook.com/docs/meta-pixel/reference
Main tag + pageView
<!-- Facebook Pixel Code -->
<script>
!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');
fbq('init', '123456789');
fbq('track', 'PageView');
</script>
<noscript>
<img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id={your-pixel-id-goes-here}&ev=PageView&noscript=1"/>
</noscript>
<!-- End Facebook Pixel Code -->
Évènements standards
fbq(
'track', 'Lead', {
content_name: 'Auto Insurance',
content_category: 'Quote',
value: 40.00,
currency: 'USD'
}
);
fbq(
'track', 'ViewContent', {
content_type: 'product',
content_ids: ['1234'],
content_name: 'ABC Leather Sandal',
content_category: 'Shoes'
value: 0.50,
currency: 'USD'
}
);
fbq(
'track', 'Search', {
search_string: 'leather sandals',
content_category: 'Product Search',
content_ids: ['1234', '2424', '1318', '6832'],
value: 0.50,
currency: 'USD'
}
);
fbq('track', 'AddToCart', {
content_name: leather sandals,
content_ids: ['1234'],
content_type: 'product',
value: 50.00,
currency: 'USD'
fbq(
'track', 'Purchase', {
content_type: 'product',
contents: [
{ 'id': '1234', 'quantity': 2, },
{ 'id': '4642', 'quantity': 1, }
],
value: 25.00,
currency: 'USD'
}
);
fbq(
'trackCustom', 'CUSTOM-EVENT-NAME', {
custom_parameter: 'ABC',
value: 10.00,
currency: 'USD'
}
);

