One of the last — but most crucial — steps before launching a marketing campaign is to set up tracking. There’s no sense in doing all the work to create a campaign if you’re not going to be able to see how effective it is and continually improve it based on that data.

Tracking your marketing often starts with your landing pages. Your pages are a hub for your customer interactions — you attract people to your pages from ads or emails and, once they’re on the page, they might make a purchase, which triggers product delivery and follow-up emails. You get a window into the actions your visitors take on the page via the tracking scripts you’ll add behind the scenes.

Tracking scripts allow you to see what’s holding your page visitors’ attention, how long they’re staying on your page, and how they interact with your content. Knowing this kind of information allows you to make improvements to your page design, content, call to action or even your product pricing and offer so that you can increase your chances of getting sales or opt-ins on your page.

Tracking scripts also allow your advertising or tracking platform to identify visitors to your site so that you can retarget them later with ads on Facebook. Without them, you would simply lose those visitors with no way of bringing them back.

You add tracking scripts, which are pieces of code, to the source code of your landing pages in your page building platform. There are dozens of different types of tracking scripts available, each allowing you to understand a different type of interaction with your pages. To help you get a sense of how you can integrate tracking scripts into your next campaign, we’ve compiled a list of the five tracking scripts that we never publish a page without. (Seriously, we put these on every single page.)


One of the most popular and powerful tracking tools out there, Google Analytics can display in-depth analytics and stats about your website’s traffic. You can see how many total visits your site earned, how many unique visitors, the average session length, bounce rate and much more. It integrates with Google’s AdWords platform for measuring the ROI of your paid search advertisements.

You can create a free account and place your own tracking code on your website to start gathering this data. Check out Google’s step-by-step instructions on how to generate your own Google Analytics tracking code snippet.


If you advertise on Facebook, adding their tracking pixel to your pages is a must. Facebook’s Pixel tracks visitors to your site and ties their data to any known Facebook accounts. This makes it possible to retarget those who visit your website, reducing your ad costs and increasing your conversions.

Even if you are not yet running Facebook ads, if you think you might do so in the future, you should add this tracking pixel to your site so that it can start collecting visitor data for you to use in future advertising campaigns.

You can also install event codes on your pages, which are, according to Facebook, “actions that happen on your website, either as a result of ads (paid) or not (organic).” Facebook has nine standard events that it tracks and then optimizes your ads for conversions.

View Facebook’s step-by-step instructions on how to generate your own Facebook Pixel.


Crazy Egg is a heat-mapping tool that allows you to see exactly where your web visitors are clicking or not clicking on your page. The tool generates screenshots of your web pages and then tracks how your visitors interact with your site. It tracks where they are clicking, how far they travel down the page, at what point they stop scrolling, and more.

Crazy Egg is a great tool for tracking which elements of your pages are working and if any changes you made are effective. View Crazy Egg’s in-depth instructions on how to generate its script.


The Google Remarketing Tag is the most straightforward tracking script on this list. It allows you to retarget those who have visited your site with advertisements. It adds your web visitors to a remarketing list, and you can show ads to those on that list.

Here are detailed instructions on how to generate your Google Remarketing


Like the other tracking scripts, the Wicked Reports script tracks your web visitors’ movements across your site. It will tell you what they clicked on first and last, what they downloaded, and more. It then compiles an ROI report to show you what is working and what’s not in your marketing funnel.

Wicked Reports even created a handy video that shows you exactly how to insert their tracking script onto any page that you create using Ontraport Pages. Check it out here.

How to Add Tracking Scripts to Your Page

Now, you might be wondering where or how to add tracking scripts to your page. With a landing page creator on a platform like Ontraport, it’s extremely easy and straightforward. While you’re building your landing pages, you simply grab the code from whatever tracking tool you’re using (Facebook, Google, Wicked Reports, etc.) and paste it into either the custom header or footer code section. You can also do this later, but we recommended you do it before you publish the page to maximize your tracking efforts.

Technically, you can put the tracking script in either the header or footer, but we suggest putting it in the footer. Tracking scripts in the header prevent page images from loading first, so visitors will be staring at a blank white screen for longer, and the perceived load time is longer.

A great way to help you organize the tracking scripts that you add to your pages is to label them within the code itself. This may sound confusing, but it is very simple. Before each individual snippet of code, you can insert a label that will tell you what tracking tool it is referencing. For example, enclosing the label “Google Analytics Code” with <!– –> brackets essentially tells the browser not to read that portion of the code. The final label looks like: <!– Google Analytics Code –>  

This allows you to see which tracking script is for what when you have multiple tracking scripts on one page.

Remember, you don’t have to use all five of these tracking scripts at once. You should pick and choose based on the platforms you advertise on and the marketing needs your business has. Let us know what tracking scripts you are using in the comments below.

About Tatiana Doscher
Campaign Strategist Tatiana Doscher is a graduate of the University of California, Santa Barbara with a dual B.A. in Communication and Global Studies. After working with several small and local businesses, Tatiana joined Ontraport’s Marketing team. She loves running, hiking and enjoying Santa Barbara’s beautiful beaches.