Add Script on Thank You Message

Hello Guys, i’m building a form and using Thank You Message instead of open url. My Question is how we can add tracking script when thank you message shown.

I don’t see how we can insert html/javascript on the thank you message. But perhaps someone can enlight me

Thanks

1 Like

Hey @Viktor_Iwan,

What specifically are you trying to do? A workaround might be to add an action when the form is submitted?

There’s no option to trigger a script in Form Action.

Well what i’m trying to do is to trigger a conversion tracking (or conversion pixel in FB Term) when people submit the form.

Of course one of the workaround i use at the moment is to use URL redirection after form submission. But it would be great if i can add the script on Show Thank You Message.

Other solution perhaps you can add… “Trigger Script” as an option within Form Action

Or do you have better idea ?

Thanks

Ahh, I gotcha. That makes sense.

The way I would do the tracking pixel is one of two ways:

Option 1: Use an Event tracking tool like The Big Picture or Google Tag Manager.

Option 2: Hijack the form submission event using event.preventDefault(), load the pixel, and then submit the form. See this post for code examples: Two-step forms