!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', '1124273989214433'); // Replace with your Pixel ID
// Track Page Views
fbq('track', 'PageView');
// Track ViewContent - For product page views
fbq('track', 'ViewContent', {
content_ids: ['PRODUCT_ID'], // Replace with dynamic product ID
content_name: 'PRODUCT_NAME', // Replace with dynamic product name
content_type: 'product', // Could also be 'category' or other types
value: 99.99, // Replace with dynamic price
currency: 'USD' // Replace with actual currency
});
// Track AddToCart event
fbq('track', 'AddToCart', {
content_ids: ['PRODUCT_ID'], // Replace with dynamic product ID
content_name: 'PRODUCT_NAME', // Replace with dynamic product name
value: 99.99, // Replace with dynamic product price
currency: 'USD' // Replace with actual currency
});
// Track InitiateCheckout event
fbq('track', 'InitiateCheckout', {
value: 99.99, // Replace with total checkout value
currency: 'USD' // Replace with actual currency
});
// Track AddPaymentInfo event
fbq('track', 'AddPaymentInfo', {
value: 99.99, // Replace with payment info value
currency: 'USD' // Replace with actual currency
});
// Track Purchase event
fbq('track', 'Purchase', {
value: 99.99, // Replace with purchase value
currency: 'USD' // Replace with actual currency
});
// Track Lead event - For form submissions or signups
fbq('track', 'Lead');
// Track CompleteRegistration event - For user registration completions
fbq('track', 'CompleteRegistration');
// Track Search event - For product search activity
fbq('track', 'Search', {
search_string: 'SEARCH_TERM' // Replace with actual search term
});
// Track Contact event - For form submissions or contact inquiries
fbq('track', 'Contact');
// Custom Event Example - Track Newsletter Signup
fbq('trackCustom', 'NewsletterSignup');