Company Blog Support
Martin Cogburn


    Back to Top

    Web Page Tracking

    What are Tracking Scripts?

    The ONTRAPORT Tracking Script allows you to see what web page(s) a contact has landed on, what pages they’ve browsed, and for how long. Web Page Tracking gives you a clear picture of what each user is interested in so you can tailor your communication with every individual accordingly. See also our Marketing Tracking feature.


    Once you’ve added tracking scripts to your web pages, you’re able to view each instance of a contact visiting your tracked page by checking their contact log for page/purl visits. You’re also able to create Rules that fire based on page visits. These Rules can be used for things such as adding Tags to contacts who have visited your page and then adding them to a Group (segmenting them) based on that Tag.


    *NOTE - WordPress sites integrated with ONTRAPORT using the PilotPress plugin do not require Tracking Scripts in order to do all this; their domains are automatically tracked.

    How to Set Up Page Tracking

    1. Retrieve the tracking script for your website from ONTRAPORT

      1. Go to Administration  > Get Tracking Code



      2. Click Select and copy the Tracking Code to your clipboard (CTRL+C).

      3. Paste the code block on all pages of your domain you wish to track. Content Management Systems (CMS) may allow you to paste the code into a theme, template or header file so it is auto-generated with each page. Note: Wordpress sites integrated with ONTRAPORT with the Pilotpress plugin are tracked automatically. They do not require adding the tracking script.

    Creating Rules Based on Page Visits

    Adding Tracking Scripts to your web pages enables you to create Rules to trigger actions when a contact visits a tracked web page. To do this, use the rule trigger Visits URL and enter the URL of the web page you wish to use. Then, select a condition (if any) and an action for the rule to perform. Learn more about Rules here.



    Using Wildcards in the 'Contact Visits URL' Trigger

    You can create Rules using the trigger mentioned above that fire when a contact visits any URL of a particular domain you own. For example, if I install a tracking script on, /features, /pricing, and /services and I want the Rule to fire regardless of which particular page on that domain a contact visits, I can add an asterisk (*) after the domain when I’m typing it into the Rule trigger field. In this instance, I would type in*


    Wildcards on names and folders of your URL work on triggers as well. This makes it possible for you to use wildcards like* or* to broaden your trigger criteria.


    Other Important Facts

    • If you want to track a specific WordPress page that is NOT integrated with ONTRAPORT, add Tracking Scripts to it by following the instructions in this post.

    • RocketLoader / RocketScript, a popular feature found in the Cloudflare plugin for WordPress, breaks our tracking script. To correct it, add data-cfasync="false" right after the opening <script tag  in the tracking script as shown in red:
      RocketLoader / Rocket Script modification

    Where To Go From Here

    Have more questions? Submit a request


    Powered by Zendesk