How can we help?

How to add Facebook Conversion Pixel Tracking

The Facebook Pixel lets you track your visitors' actions as they browse your site. To use the Facebook Pixel with your lightbox follow these instructions.

Create Your Pixel

The first step is to set up your Facebook Pixel if you haven’t already done so. Facebook has a good tutorial here.

The pixel code you get will look something like this:

Set Up the Primer Webforms Version of the Code

Open up your favorite text editor. Notepad will do the trick! Copy the code below into the text editor.

!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 FACEBOOK PIXEL ID');
fbq('track', 'PageView');

Now take a look at the code you got from Facebook. Copy your Facebook Pixel ID and replace YOUR FACEBOOK PIXEL ID in the code above with the value found in the code from Facebook.

Now Add the Code to Your Primer Webforms Account

Head to the Custom JS (Boxes) section of your account.

Create a new snippet of code, set it to After Submit and paste the code you created into the editor. Now turn the new snippet of code on, and publish your changes.

That's all there is to it! Your lightboxes are now using the Facebook Pixel!

Comments

0 comments

Please sign in to leave a comment.