How do I add tracking pixels or JavaScript code to [...]?

In this FAQ, we’re going to show you where to install tracking pixels and tracking code in the many popular page building tools and affiliates networks in use. But, before you read further, if you don’t already have a good understanding of where to install tracking pixels on an HTML page, the rest of this document will make more sense if you review this FAQ first:
 
  Where do I install tracking pixels and tracking code?


Installing Tracking Pixels and Tracking Code in Page Builders

To install tracking pixels and tracking code in Page Builders, you’ll generally want to look for the Page Settings of the page you’re editing. It’s very common to find the Page Settings button displayed as a “gear” icon:  

After clicking on the Page Settings button, look for something that talks about tracking pixels, tracking code, or JavaScript (since tracking code is usually written in JavaScript).
 
Once you’ve found the correct area, you’ll typically be allowed to insert pixels or code in either the “head” or “body” sections.

Some Page Builders will let you be even more specific by letting you choose between the start or end of a section. The end of the “body” section (right before the ((/body)) tag) is often called the “footer” section, so that’s something to keep in mind, particularly if you’re trying to insert the Sub-ID code which should go in the footer section.

Tip: Here’s a quick overview of where you should install the different types of tracking pixels and tracking code for best results:
 
((head))…
((/head))
   The FunnelMagick tracking code, JavaScript tracking pixels, and Organic tracking code should all be inserted in the “head” section of the page if at all possible, but can be inserted in the “body” section if that’s your only choice.
 
((body))…   Traditional HTML tracking pixels that use the ((img)) tag must go between the ((body)) and ((/body)) tags and as close to the top ((body)) tag as possible.
 
…((/body))   JavaScript Sub-ID code (typically used for passing click IDs through pages) must go between the ((body)) and ((/body)) tags, as close as possible to the bottom ((/body)) tag.


Here’s how to add your tracking pixels in some of the most popular Page Builders, shopping carts and eCommerce platforms ...


Add Tracking Pixels and Tracking Code in Leadpages

Find the page you want to add a pixel to and click the blue “Edit" button on the right side. Once in the editor, follow these steps:
 
1.    Click on the Settings option where it says “Lead Page Options” in the menu on the lefthand side of the page. This will display a pop-up window.
 
2.    Select “Tracking Codes” from the pop-up.
 
3.   
You will have the option to paste your pixels and code in the “Head” section, or the “End-of-Body” section.

Paste your tracking pixels and Sub-ID code in the End-of-Body section and paste your Organic and FunnelMagick tracking code in the Head section.



If you’re using Leadpage’s Drag & Drop Editor, you can find instructions on how to insert tracking pixels and tracking code here:
 
   Adding Tracking Code To Your Leadpage — Drag & Drop Builder


Add Tracking Pixels and Tracking Code in ClickFunnels

Go into the editor for the page you want to add the tracking pixel or track code to, then follow these steps:
 
1.    Select “Settings” at the top of the page editor.
 
2.    Select “Tracking Code”.
 
3.    You will have the option to paste your pixels and code in the “Header” section, or the “Footer” section. Remember, “Footer” is just another way of saying “at the end of the Body section, before the ((/body)) tag”.

Paste your Organic and FunnelMagick tracking code in the Header section, and paste your tracking pixels and Sub-ID code in the Footer section.

 
Note: With ClickFunnels, your “Thank You” pages will almost always be secure https pages so you’ll normally want to use https in your pixel URL as well. Simply choose the “secure” option in the Pixel Builder which will change the pixel from http to https and you’ll be all set.


Add Tracking Pixels and Tracking Code in OptimizePress 

First click “Page Settings” in the LiveEditor for the page you want to add a pixel to, then select “Other Scripts”.

There are four places you can add pixels and tracking code depending on what you’re adding. For ClickMagick pixels select “After ((body)) tag”.

For Organic or FunnelMagick tracking code, select “Header”, and for Sub-ID code select “Footer”.




Add Tracking Pixels and Tracking Code in InstaBuilder

To add pixels or tracking code to an InstaBuilder page, enter the page editor and follow these steps:
 
1.    Click on the gear Settings button in the upper-right corner of the page to open the Settings menu.
 
2.    Choose “Scripts/Codes” from the menu.
 
3.    The “Scripts/Codes” panel gives you the option to paste your pixels and code in one of three places, the Head section, the start of the Body section, right after the ((body)) tag, and in the Footer section, right before the closing ((/body)) tag.

You should paste tracking pixels in the Body section. Your Organic and FunnelMagick tracking code should go in the Head section. And your Sub-ID code should go in the Footer section.



Add Tracking Pixels and Tracking Code In WordPress

To add a tracking pixel to a WordPress page simply edit the page in question, click the “Text” tab in the upper right-hand corner of the editor to switch to source mode, and then paste your tracking pixel code into the box as shown below …




A more powerful solution for WordPress is to install a tracking code plugin such as the popular “Tracking Code Manager.” With this plugin, you can place tracking pixels or tracking code on any page anywhere without having to touch the pages themselves.

Just install the plugin, then install pixels and code from the plugin’s settings.




One great feature of the Tracking Code Manager is that you can make system-wide settings. This can be extremely useful for Organic and FunnelMagick pages—just install the tracking code once “for all pages” and you never have to worry about installing code on individual pages.

Our video tutorial on Organic Tracking will show you exactly how to install and use the Tracking Code Manager. Look for the Chapter mark on the video titled Installing the WordPress “Tracking Code Manager”.



Add Tracking Pixels and Tracking Code in Unbounce

To add JavaScript code to the “head” of a page you’ll want to use Unbounce’s Script Manager which you can find in the bottom left corner of the Landing Page Editor.

To add an image tracking pixel to the “body,” just add a new code section to your “Thank You” page by clicking on the “(())” button and pasting it there …




The Script Manager will take you to the JavaScript editor where you can choose the placement of the code and insert the code:




Add Tracking Pixels in Instapage

To add a tracking pixel to the “head” of a page select “Settings” and then “HTML/CSS.” To add a pixel to the “body” of a page, like you need to do with ClickMagick, just add a new HTML Element, click the blue “Edit” button and paste your pixel code there …




Add Tracking Pixels in Shopify

To add a sales tracking pixel to your Shopify order status page, just click “Settings” and then “Checkout.” Then in the “Order processing” section just paste your tracking pixel into the “Additional content and scripts” box …



To include the order amount in your tracking pixel, just use this Shopify token:

{{ total_price