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.
These are triggered when a visitor views your form.
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 Manage Site link in the top navigation bar.
Step 2: Click on Tracking in the left menu panel.
Step 3: Add the View Pixel and Subscribe Pixel in the Site Tracking section.
Step 4: Click on the Save Site Tracking button at the bottom.
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
fbq('init', 'Pixel ID goes here');
Note: Add the Pixel ID to be fired to the Facebook tracking pixel code above.