Implement Facebook Pixel in Default Carts through Google Tag Manager
A. Create a tag for Facebook Pixel Page View Initialization
1
Create Page View tag
<!-- 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', '{your-pixel-id-goes-here}');
fbq('track', 'PageView');
</script>
B. Configure dataLayer variables in Google Tag Manager

C. Create a User-defined variable in Google Tag Manager for Facebook called FacebookEventsScript
D. Create a trigger specifically for the purchase event
E. Create a tag for the Facebook Pixel for the purchase event
Optional — send information with the Facebook Pixel at checkout if needed
PreviousImplement Facebook Pixel in ConvertPlus and Inline carts through Google Tag ManagerNextImplement Google Analytics 4 in ConvertPlus and InLine Checkout (with GTM)
Last updated
Was this helpful?











