How to track a thank-you page view
Published September 11, 2026
Topics:
Question
Our lead form redirects to a thank-you page with the email and name in the URL (?email=...&name=...). How do we track the thank-you page view in Able CDP so the lead is attributed to its marketing source?
Answer
You can track a thank-you page view with Able CDP, but in most cases it's better to track the form submission itself rather than the page that follows it. Able's form tracking captures the lead at the moment the form is submitted and ties it to everything already known about the visitor — UTM parameters, referrer, landing page, Google Ads and Meta click IDs — without relying on the thank-you page loading, or on customer details surviving a redirect. Thank-you page tracking is a good fallback when form tracking isn't feasible, and the instructions for it are further down this page.
Why tracking the form is preferable
A thank-you page is a proxy for a conversion, whereas a form submission is the conversion. Tracking the form directly avoids several ways in which thank-you page tracking can lose or distort data:
- The thank-you page may never load. Visitors close the tab or navigate away before the redirect completes, particularly on mobile. The form data is already submitted, but the thank-you page view — and the lead — is lost.
- The page view isn't the same as a submission. Thank-you pages get bookmarked, shared, refreshed, reached from a browser's back button and crawled by bots. Each of those is a page view without a corresponding lead, which inflates conversion counts.
- Customer details have to be passed along. To associate the visitor with an email or phone, the thank-you page needs to receive them, usually as query parameters. Not every form tool can do this, and putting email addresses in URLs means they end up in server logs, browser history, analytics reports and
Refererheaders of any third-party resources on the page. - Redirects can break the visitor session. If the thank-you page lives on another domain or subdomain, the visitor identifiers Able uses have to be carried across it, which adds a cross-domain tracking dependency the form itself doesn't have.
Form tracking has none of these issues, and it's also the quicker option to set up: for HTML forms and most popular form widgets, the Get Code section of the Able Dashboard generates the tracking code automatically.
Recommended: set up form tracking
- Open the Get Code section in the Able Dashboard.
- Add the URL of the page containing the form and check that Able recognizes the form and its email and name fields. If the same form appears on multiple pages, adding a single one is enough.
- If the form is rendered by a third-party widget such as HubSpot, Klaviyo or Calendly, enable it first using Add Service Integration, then generate the code.
- Generate the tracking code and install it in the site header or through your tag manager.
Once installed, Able starts recording form submissions as Lead events and attributing them to their marketing sources straight away. The Form Tracking guide covers HTML forms, form widgets and web application forms in detail; for forms rendered by a JavaScript framework, see tracking in single-page applications and the JavaScript API.
Fallback: track the thank-you page view
There are situations where the form can't be tracked directly — for example, when the form is hosted by a tool that Able doesn't have a widget integration for, when it's embedded in an iframe you don't control, or when the only place customer details are exposed to your site is the thank-you page. Tools such as Teachable and WebinarJam are tracked this way, on their thank-you pages, for exactly this reason.
In such cases, if your form tool can pass the submitted details to the thank-you page URL as query parameters (for example ?email=...&name=...), you can fire a custom event on that page to associate the visitor with the email address.
Step 1. Make sure the Able tracking script is loaded on the thank-you page
If you've already installed the tracking code from the Get Code section of the Able Dashboard site-wide, you're covered. Otherwise, add the page view tracking snippet to the thank-you page.
Step 2. Send an event from the thank-you page
Add the following script to the thank-you page only. It reads the email and name from the URL and sends them as a Lead event. You can use a different event name, such as NewsletterSignup, if you prefer — custom event names don't require any prior configuration.
<script>
window.addEventListener('DOMContentLoaded', function () {
// Parse query parameters from the URL
var params = new URLSearchParams(window.location.search);
var email = params.get('email');
var name = params.get('name');
if (email) {
uipe('track', 'Lead', {
keys: {
email: email
},
lead: {
firstName: name || ''
}
});
}
});
</script>
The if (email) check ensures that nothing is sent when the page is opened without the parameters, for instance from a bookmark. See Send Events Using Webhooks for the full list of supported keys and other event parameters, such as phone number or last name.
This tells Able to associate the visitor's session — including UTM parameters, click IDs and referrer — with the email address. From that point forward, any purchase or other conversion by that customer, even if it happens days or weeks later, will be attributed back to the original marketing source.
Note: If the thank-you page is on a different domain from the rest of your site, make sure cross-domain tracking is set up. Able follows the Google Analytics cross-domain configuration automatically, so if Google Analytics is already configured for both domains, no extra work is needed.
Once the event fires, the tracked leads appear under Customers → Leads in the Able Dashboard, exactly as they would with form tracking.
Summary
| Form tracking | Thank-you page tracking | |
|---|---|---|
| When the lead is captured | At the moment of submission | Only if the thank-you page loads with the details in the URL |
| Accuracy | One event per submission | Can miss submissions or count repeat page views |
| Customer details | Read from the form fields | Must be passed in the URL by the form tool |
| Setup | Generated automatically in Get Code | Custom script on the thank-you page |
| Use it when | Whenever possible | The form can't be tracked directly |
If you're unsure whether your form can be tracked directly, contact Able CDP support and we'll help you choose the right approach.
What's next?
- Learn more about how Able Customer Data Platform helps to track customer journeys and solve attribution problems
- Review our solutions for tracking and attribution needs