Skip to content
English
  • There are no suggestions because the search field is empty.

Resova - Setting up Facebook Pixel with Google Tag Manager

Facebook Pixel can easily be added to Google Tag Manager by using the the Custom html/JavaScript tag. It is recommended that you have Resova's pageView and purchased events set up for this tag, please use our guide on Importing Resova's Google Tag Manager Triggers & Variables to get those added.

Setting up Facebook Pixel Pageview Event

Click Tags on the left and then New.

In the tag form that appears, click the top left to add a name to the tag, for example "Facebook Pixel PageView". Then click tag configuration and, in the list that appears, scroll down to select Custom HTML.

In the HTML field enter your Facebook Pixel PageView code, for example:

 

   !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');

Click the Triggering box below and your list of triggers will appear. Click the pageView custom event and this will be added as the trigger.

Click Save in the top right to finish setting up the tag. Your basic Facebook Pixel tag is now ready to go and in order to go live with it you need to click the Submit option in the top right of Google Tag Manager

Setting up Facebook Pixel Purchased Event

Click Tags on the left and then New.

In the tag form that appears, click the top left to add a name to the tag, for example "Facebook Pixel Purchase". Then click tag configuration and, in the list that appears, scroll down to select Custom HTML.

In the HTML field enter your Facebook Pixel Purchase code, for example:

   !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', 'Purchase', { value: , currency: 'USD' });

In the code example above two variables are highlighted and need to be added to your code. Currency needs to be changed to the your currency, such as USD, GBP etc.  is a Resova Custom Variable for the purchased transactions total.

Click the Triggering box below and your list of triggers will appear. Click the purchased custom event and this will be added as the trigger.

Click Save in the top right to finish setting up the tag. Your basic Facebook Pixel tag is now ready to go and in order to go live with it you need to click the Submit option in the top right of Google Tag Manager