How can we help?

Add Facebook conversion pixel tracking

Overview

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.

Add the code to your primer webforms account

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

2. 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.

3. 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.