For general Meta Pixel concepts, see the Meta Ads overview.
Prerequisites
- Meta Business account
- Meta Pixel ID
- Volusion admin access
Installation
Method 1: Template Injection
- Go to Design > File Editor
- Open
template_header.html - Add before
</head>:
<!-- Meta 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', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.net/tr?id=YOUR_PIXEL_ID&ev=PageView&noscript=1"/>
</noscript>
<!-- End Meta Pixel Code -->
- Replace
YOUR_PIXEL_IDwith your Pixel ID - Save and clear cache
Method 2: Via GTM
Ecommerce Events
ViewContent
Add to product template:
<script>
fbq('track', 'ViewContent', {
content_name: '%product_name%',
content_ids: ['%product_code%'],
content_type: 'product',
value: %product_price%,
currency: 'USD'
});
</script>
AddToCart
<script>
document.querySelector('.add-to-cart').addEventListener('click', function() {
fbq('track', 'AddToCart', {
content_name: '%product_name%',
content_ids: ['%product_code%'],
content_type: 'product',
value: %product_price%,
currency: 'USD'
});
});
</script>
Purchase
Add to order confirmation:
<script>
fbq('track', 'Purchase', {
value: %order_total%,
currency: 'USD'
});
</script>
Verification
- Pixel Helper: Install Meta Pixel Helper extension
- Events Manager: Check Test Events tab
- Complete test purchase: Verify Purchase event
Troubleshooting
Pixel not firing:
- Clear template cache
- Check correct template file
- Verify Pixel ID
Events missing:
- Check variable syntax
- Verify on correct page type
- Test event code in console