Skip to main content
All CollectionsTracking Pixels
How to add Facebook Pixel to Mailmunch Campaigns?
How to add Facebook Pixel to Mailmunch Campaigns?
Liz Gannes avatar
Written by Liz Gannes
Updated over a year ago

In this article, you’ll learn how to integrate the Facebook Pixel tracking code with your Mailmunch campaigns.

Facebook Pixel Code

The Facebook pixel code is comprised of two elements:

1. Base Code

According to the Facebook Pixel documentation, it is recommended that you add the Base code for the Facebook Pixel to all the pages of your website where your campaigns will appear.

2. Standard Event Code

The Standard Event code will be added to your Mailmunch campaigns.

An example of the Facebook Pixel code is displayed in the attachment below.

There are several different approaches you can choose to add the Facebook Pixel to your Mailmunch campaign.

1. Add Pixel in Forms

Mailmunch allows you to put two types of tracking pixels for each form via behavior step in the campaign builder.

  • View Pixel
    These are triggered when a visitor views your form.

  • Subscribe Pixel
    These are triggered when a visitor successfully subscribes to your form. You can also pass in subscriber's email address by typing [EMAIL].

2. Add Pixel in Landing Pages

In your landing page, you can put tracking pixels to track when the landing page is viewed or when the user has subscribed via HTML block.

  • Main Page Pixels
    These are triggered when a visitor views your landing page.

  • Thank You Page Pixels
    These are triggered when a visitor successfully subscribes using a form in your landing page.

3. Site Tracking

Follow the steps below to add tracking pixels at a site-level.

Step 1: Click on the Site Settings link present on the bottom left of your screen in the sidebar.

Step 2: Click on the Tracking card to set up third party tracking pixels for your campaigns.

Step 3: Add the View Pixel and Subscribe Pixel in the Site Tracking section. Click on the SAVE CHANGES button at the bottom.

  1. View Pixel
    These are triggered when a visitor views your form.

  2. Subscribe Pixel
    These are triggered when a visitor successfully subscribes to your form. You can also pass in subscriber's email address by typing [EMAIL].

Note: These are global pixels that are fired when any of your forms or landing pages is viewed, or when a visitor subscribes. If you have existing pixels on your forms or landing pages, those will fire in addition to the following.

Facebook Tracking 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", "<PIXEL ID HERE>");fbq("track", "Lead");
</script>

Note: Add the Pixel ID to be fired to the Facebook tracking pixel code above.

Did this answer your question?