GTM Form Submit Event - Unbounce Pages

  • 18 June 2014
  • 5 replies
  • 38 views

Hi there,

I am trying to setup auto-event tracking on my unbounce pages. The problem is gtm.formSubmit or gtm.click is not broadcast. Is there a way around this?


5 replies

Bumping this – this is a critical feature if redirecting to another page, as the client often does not have the capability to place GTM on a conversion pixel.

Userlevel 2

Hi Ciaran and Michael,

I’ve been testing Google Tag Manager and I’ve found that gtm.click events do work with Unbounce pages, but gtm.formSubmit appear not to.

In terms of getting click events working, it’s a pretty involved process. You first need to make sure that you add a separate ‘Click Listener’ tag and add a firing rule to make sure it runs when your page loads. Then you add your script as a separate tag with a firing rule that {{event}} must equal gtm.click , as well as a rule specifiying which pages this should happen on.

If this isn’t working, a good way to test it is by putting the container into Debug mode.

As I said, gtm.formSubmit seems not to work with Unbounce forms, however.

This is likely something to do with the JavaScript that we use to handle our form submissions. Even if you did manage to get it working, it might not be the best idea because it would possibly fire when the form button was clicked regardless of whether the form validation passed and whether the form was actually successfully submitted or not.

It’s usually easier just to place your conversion tracking scripts directly on the form confirmation dialog, which ensures that it’ll run only when the form is successfully submitted. This is what a lot of our customers do with, for example, Adwords conversion scripts. If you’re sending the user to another page instead, you could place the script there instead of on a form confirmation dialog.

If you’re working with lots of pages you could also probably still use GTM with this approach. Perhaps you could make a separate container that you place on all your form confirmation dialogs. Or you could even use the same container and have a regular expression to only fire conversion codes from form confirmation dialogs. We have an example regex that’ll catch all form confirmation dialogs in the article at: http://support.unbounce.com/entries/2…

That link will also be useful if you’re just looking to track form submissions as conversion goals in Analytics.

I hope that helps!

Hi Mark,

I still need to know if there is any way you can track the form submit if it’s a pass through and you DONT have the option of placing a script on the target page. We are an agency heavily using Unbounce and this is a very common scenario with our customers.

If you can point to any safe way to detect the form submit, I’m OK with a bit of javascript to pick it up as an event…

Best regards
Lars

Userlevel 7
Badge +3

Hey Lars,

I had a similar issue with the Hotjar Form Analysis not picking up the form submit.

A bit of JS and lots of testing was able to solve it.

I don’t see a reason why you can’t listen to for the form submit and fire off a request to GTM.

Best,
Hristian

We also DONT have the option of placing a script on the thank you page.
Tracking clicks is not enough as well because of false clicks that don’t result a conversion.

5 years have passed since the first post expressing the need.
Are there any solutions you can provide?

Reply