Home > Getting started > Set up > Add the Ontraport tracking script to your site
Home > Set up  >  Add the Ontraport tracking script to your site

Add the Ontraport tracking script to your site

Figure out who’s visiting your site and where they’re coming from by adding Ontraport’s tracking script to your web pages.
In this lesson you'll learn:
  • How tracking scripts work
  • How your website builder of choice affects your tracking script install 
  • How to install a tracking script on a WordPress site 
  • How to add a tracking script to other website builders

Comments

[Block//Author//First Name ##cap_first] [Block//Author//Last Name ##cap_first] on [Block//Date Added %F j, Y g:i a%+0d0h0m]
[Block//Comment]

Leave your comment

settings
settings
settings
settings
14-day free trial. No commitment.
Start your free trial to start growing your business with Ontraport.

Related resources

[Block//Resource Type]
[Block//Resource Description ##ellipsis(166)]
arrow_forward
Read more

Transcript

The Ontraport tracking script is a small piece of code that lets Ontraport see who's visiting your site and where they came from. For it to work, it needs to be on every page of every website you run. In this lesson, you'll add it in a few minutes. With the script on your pages, Ontraport can record the UTM values from the links people click, both the first campaign that brought a contact in and the most recent one. You'll find them in the Lead Information section of the contact record. UTM tracking is available on Pro and above. The script also powers automation. The Contact visits URL trigger and goal react when a contact visits a page on a site outside Ontraport, and they only work if the tracking code is on that page. With tracking in place, you can also add lead score points when someone looks at your pricing page. How you add the script depends on what your site is built with. There are three cases. If you build with Ontraport Pages, you're done. The script is installed automatically. For WordPress, the easiest way is Ontraport's PilotPress plugin. It's available on Plus and above. First, click the profile icon, go to Administration, then Advanced Features, and turn on WordPress. Then go to Administration, then Integrations, then WordPress Website. Click New WordPress Site and choose Existing WordPress Site. Give it a name, enter your site's URL without a slash at the end, and copy the App ID and API Key at the bottom. Then click Save. Now log in to WordPress as an administrator. Go to Plugins, then Add New, search for PilotPress, click Install Now, and then Activate. When it asks, paste in your Application ID and API Key. PilotPress can do more than tracking, but you can ignore those features for now. On a Basic account, or if you'd rather not use the plugin, use the manual method next. For any other site builder, click the profile icon, go to Administration, then the Developer Preferences and Resources tab, and click Get Tracking Code. Copy the code. Paste it into the footer of each page, right before the closing body tag. Most site builders have a site-wide code or footer setting, so you can paste it once and it covers every page. If you use Google Tag Manager, you can add it to every page from there. If you're not sure where custom code goes in your builder, ask that software's support team. One tip. If your WordPress site uses Cloudflare's Rocket Loader, the script won't work as is. Add data-cfasync equals false right after the opening script tag, like this. So: Ontraport Pages handle it for you, WordPress uses PilotPress, and every other site gets the code pasted before the closing body tag, on every page. Next up, we'll customize your contact records.
Get started with Ontraport for free

Start gaining the skills to grow your business faster

settings
14 days free. No commitment.
Google Review Trustpilot Review G2 Review Capterra Review
Get started with Ontraport for free

Start gaining the skills to grow your business faster

settings
14 days free. No commitment.
© Ontraport 2026
playlist_add_check
PCI DSS, Level 1
security
EU-U.S. Data Privacy Framework.
[bot_catcher]