Note: This is an advanced method of using Pardot tracking code that will require assistance from your developers to function properly.
piTracker, which is loaded in the default tracking code, is responsible for sending page visits to Pardot. The function takes a single argument,
trackerURL, which should be a string for an absolute (not relative) URL. That URL is passed to Pardot, and Pardot tracks a page visit to that URL for the cookied visitor. An example call to
piTracker would look like this:
To get this working on your website, follow these three steps:
Once this is implemented, each page state change that sends a URL to the
- Determine the URLs you want to track. On some sites, each page state will have its own unique URL. On other websites, this is not the case. You will need to determine which page states should be tracked as which URL. The URLs passed to
piTracker do not need to be functioning URLs, but they do need to be unique for each tracked page state.
- Add the
piTracker code to the appropriate code path. You will need to add a call to
piTracker in the code path for the event that causes the state change, passing in the URL that you'd want to be tracked for that particular page state.
piTracker function will be tracked as a page visit in Pardot.
Need more? Start a conversation with other Pardot users in our Success Community