Using Personalization Tokens on Thank You Pages


Dear HubSpot Community,

I’ve been trying to use Personalization Tokens ({}) on Thank You Pages without much success.

HubSpot Support says that I can’t because they don’t have time to save the contact before the page redirect.

That’s why I’ve used the following code:

    var url = window.location.href;
    if (url.indexOf("?submissionGuid") > 0) {
        window.setTimeout(function() {
            window.location.replace(url.slice(0, url.indexOf("?submissionGuid")));    
        }, 800);

Located into the page’s head, it works okay. However, it’s perceptible for the user that I’m reloading the page. It’s also very unreliable as it depends on how much time does HubSpot actually need to save the contact (which sometimes takes more than 800ms).

This solution isn’t elegant at all and I’d love to find something a little better.

Any thoughts on your end?

Many thanks!