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, which are a hub for your customer interactions. You get a window into the actions your visitors take on the page via the tracking scripts that you 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. 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.


Google Analytics

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. Google Analytics seamlessly 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.

Facebook tracking pixel

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

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.

Google Remarketing Tag

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


Google Tag Manager

Unlike other tracking scripts, Google Tag Manager stands out from the rest by allowing easy installation of just one script to your pages. It serves as a simple tool used for tag management. If you have a lot of tags to keep track of, Google Tag Manager allows you to manage all other scripts in one area without having to manually edit every single page. Instead, you get to deploy your tags with one simple installation — for free. Although Google Tag Manager serves a different purpose from Google Analytics, they actually go hand-in-hand. In fact, Google Tag Manager allows you to customize the data that gets sent to Google Analytics. Check out how to manage all your website tags without editing code 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 is simple and straightforward. While you’re building your landing pages, all you have to do is grab the code from any tracking tool you’re using (Facebook, Google, Wicked Reports, etc.) and paste it into either the custom header or footer code section. To ensure less loading time for visitors, we suggest inserting scripts into the footer. When inserting the tracking script into the header, you run the risk of visitors staring at a blank white screen for longer since headers prevent page images from loading first.

While you can add scripts to your page at any time, we recommend you do it before publishing the page to maximize your tracking efforts.

Another useful strategy 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 does what when you have multiple 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 your business’s marketing needs. 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.