DSC.c9ecef95

(No) Thank You Pages

Author
Cavaliero, D.
Filed Under
Data Collection

I honestly can't believe that companies and/or marketers are still using this practice in 2025. It was a poor practice 10 years ago, and things haven't changed.

So, let's break this age old practice down. Why is it a bad idea?

Overview

The concept is simple. By "redirecting" a user to a unique page that "can't be reached" unless a form or transaction is completed -- it can be used as a proxy to "measure" the prior action that drove the page visit/view.

These pages are commonly referred to as "Thank You" (TY) or "Confirmation" pages. "Confirmation" pages are typically used for purchase and/or registration actions, while TY pages are broadly used for generic form submission measurement (e.g. lead generation).

This all sounds well and good at the surface level. But where does it fall short?

Failure at scale

TY page based measurement can work reasonably well for simple sites with a small number of forms or conversion paths.

However, it can start to fall apart quickly once a business starts needing to measure cohorts of conversions via consistent URL patterns. Unfortunately, the process/discipline required over time to keep things manageable and easy to understand is difficult for even mid-sized organizations.

Loss of context

Whenever you rely on "reaching a page" to measure a prior outcome, you naturally lose the context of the prior action (e.g. form) that drove the exact thing you were trying to measure.

More times than not, a subset of the data submitted through a given form is highly valuable to pass into advertising pixels and/or as custom dimensions as analytics/behavioral events. I often refer to this as "contextual" data.

Redirects/navigation naturally break this context. The web (not assuming fancy single-page-application (SPA) tech) is a stateless environment, meaning actions taken on "Page A" are unknown to "Page B".

Once the page unloads and navigation occurs, all of the "context" from the form submission or conversion action is lost. There is no way of knowing what occurred to get a user to the URL being used as a measurement trigger.

So what do marketers reach for to solve this "state" problem? Well...

Let's talk data leaks 💧

Marketers/developers often reach for the same medium they used to get this far -- the URL -- via appended query parameters (see a pattern here?).

This technically works and is OK for innocent or non-sensitive data. However, all too often developers get lazy and append all the data from a form submit (including name, email, phone etc...) into the URL in addition to other parameters.

Congratulations 🎉, you/they've now just created a data-leak. Any 3rd party scripts or tools (e.g. GA4, Meta/Google Ads, social share buttons etc...) now have directly collected that information without you realizing it.

Which leads me to this lesson/rule 👇

There are some exceptions to the above. If the developer encrypts the data before appending it to the URL using query parameters can be OK - but there are honestly better methods available for state persistence in (most) situations.

Which brings me to my final point...

Honestly? It's kind of lazy

It is not terribly difficult to measure a "valid" form submission before a redirect occurs in 95% of situations. But, it does require "some" extra effort.

"Who cares?! It works!"
—— Some exec somewhere

Sure, it does -- until it doesn't. It's loosey-goosey measurement at its best, and easily prone to false positives and/or data leaks at worst. Over the years the "ship it/move fast and break things" thought goblin meandered its way into the brains of marketing professionals.

Consider these scenarios...

  • Pages get indexed -- via organic search and/or internal search engines
  • Users bookmark confirmation pages and/or leave them in an open tab for days/weeks (which can cause duplication)
  • A TY page URL is used in an automated email autoresponder/drip campaign CTA link.
  • Users also love refreshing pages for no good reason.

All of the scenarios above introduce "false positives". You may ask or say "why would a user do that? It's weird/atypical behavior".

👉 Humans are odd creatures, they will not behave like you expect no matter how well you think you know your audience/demographic.

A practical example

Let's take the following code snippet to measure HubSpot form submissions.

1window.addEventListener('message', function(event) {
2 
3 if (event.data.type !== 'hsFormCallback')
4 return;
5 
6 var provider = 'hubspot',
7 object = 'form';
8 
9 var action = {
10 'onFormSubmit': 'submit',
11 'onFormSubmitted': 'submitted'
12 }[event.data.eventName];
13 
14 if (!action)
15 return;
16 
17 function formatFieldData(data) {
18 
19 var fields = {};
20 
21 if (Array.isArray(data)) {
22 fields = data.reduce(function(obj, item) {
23 obj[item.name] = item.value;
24 return obj;
25 }, {});
26 } else {
27 fields = event.data.data.submissionValues;
28 }
29 
30 delete fields['hs_context'];
31 delete fields['g-recaptcha-response'];
32 
33 var map = {};
34 
35 for (var prop in fields) {
36 if (!fields.hasOwnProperty(prop))
37 continue;
38 
39 if (!map[prop])
40 continue;
41 
42 fields[map[prop]] = fields[prop];
43 delete fields[prop];
44 }
45 
46 return fields;
47 
48 }
49 
50 dataLayer = window.dataLayer || [];
51 dataLayer.push({
52 event: provider + '.' + object + '_' + action,
53 form: {
54 id: event.data.id,
55 redirect_url: event.data.redirectUrl,
56 provider: provider,
57 fields: ['submit', 'submitted'].includes(action) ? formatFieldData(event.data.data) : {}
58 }
59 });
60 
61});