Hotjar experience on Unbounce pages?


Anybody pairing Hotjar tools with Unbounce pages? Does the “Form Analytics” feature work with Unbounce forms? Would you recommend it?


29 replies

Go for it. I’d be curious to have some others try the script and also review it for any potential issues.

Userlevel 7
Badge +1

Brian this is awesome, thanks so much for sharing this!!

This is Tips & Scripts worthy - would you mind if we shared this in there?

-Jess

I have a working script thanks to the help of my developer pal at work. This should work on any page as long as the normal Hotjar script and this script load on your desired page. I prefer to do this through the Settings > Scripts menu.

<script type="text/javascript">
	lp.jQuery(function($) {
		function notifyHotjar() {
			lp.jQuery('.lp-pom-form form').submit();
			hj('formSubmit' + ($('.lp-pom-form form').valid() ? 'Successful' : 'Failed'));
		}

		$('.lp-pom-form .lp-pom-button')
			.unbind('click tap touchstart')
			.bind('click.formSubmit', notifyHotjar); 

		$('form')
			.unbind('keypress')
			.bind('keypress.formSubmit', function(e) {
				if(e.which === 13 && e.target.nodeName.toLowerCase() !== 'textarea' ) {
					notifyHotjar();
				}
			});
	});
</script>

Best,
Brian

Anyone get successful form submits in HotJar?  Anyone know how to override Unbounce’s form submission, so I can add the HotJar script they provide for manual submit tracking?

Did anyone figure out the fix here?  Having the same issue with not gathering any successful submissions in HotJar.  I am doing an external form post that then redirects to my thank you page, both of which are not within the Unbounce platform.  Where do I place the submit response scripts mentioned above?

Here is the dev page for reference - get.enlightiumacademy.com/dev-lp

Thanks, Dave

Announcement from Hotjar!

Hotjar now supports Cross and subdomain tracking!

What a relief that it’s finally here.

Hristian, 
Shhhh… don’t tell them about the World Domination plans yet! Haha, in all seriousness, this extra field helps our anti-spam filters do their thing. Don’t pay it any attention. :) 

Yes the same thing was baffling me - thanks for explaining it Hristian !

AHA ! I’ve been trying to work this out for the past two weeks !! Thanks for posting this up Paul !! 

Userlevel 6
Badge +4

Thanks for the input!

I always use a separate confirmation page instead of the popup. It still does not work 😉

Userlevel 7
Badge +3

Hey Finge, 

A while back, I’ve researched the same issue and came to a conclusion that the submit event is not getting passed through to Hotjar. 

Digging a bit more, I found this: http://docs.hotjar.com/docs/using-javascript-to-handle-form-submissions

A bit of javascript as shown in the example should fix it, but I never got around to actually testing it. It wasn’t a deal breaker for me. 

If I remember correctly the submit event will get passed through only if after submission a new page is loaded. In the case with Unbounce, it’s usually a popup so the page is still in the background.

I think that is what breaks the submit reports. 

Let me know if you get it working as I would be also interested for future projects. 

EDIT: This is the exact wording from Hotjar for a successful submit event:

Successful submit #

  • A ‘successful’ submit occurs when the page where the form is shown returns a message that the form was successfully submitted.
  • Tracking: A submit() event happens on the form, the page changes to a different URL and the form is no longer present, manual tracking: hj(‘formSubmitSuccessful’)
Userlevel 6
Badge +4

I have set up a few forms, and it seems to be tracking fine. EXCEPT that none of them show successful submits even though I know there are plenty.

Has anyone else experienced this?

Yup, cross-domain tracking is something I’ve been keeping an eye on for a long time. They have had it in their “roadmap” since the day it went into beta. And I’ve seen them push this/delay this quite a few times. 

This is important because without it, you have to individually create these profiles and we can’t track variants either. 

CrazyEgg does it. Tracks the variants, and subdomains. 
Good luck!

Very interesting thanks Paul!

I was wondering the same thing a while ago, when I briefly looked at using Hotjar Form analytics.

Good shout Hristian also!

Hi everyone,

Ah yes, the mysterious extra form field. 🙂

You’ve stumbled upon one piece of our anti-spam infrastructure.  The “ubafs-” fields are part of the “BearTrap” we set on our form fields to catch form spammers.  If you’re interested in the technical details of our spam blocking, Derek (one of our Senior Developers) wrote about it in detail here:
http://inside.unbounce.com/product-dev/spam-egg-spam/

The short version is that there is a hidden field that real, human visitors can’t see but bots can. If the bot fills the field, we have a pretty good indication that the data is junk. Fighting to make sure that you only get good leads is something that we work diligently at. 

Userlevel 7
Badge +3

Hi Finge,

I’ve also noticed the extra field being added to the list of tracked fields when I was first setting up the form tracking for a page.

It is not the submit button.

The random numbers and letters after “ubafs-…” actually change each time you reload the page. 

It’s either some kind of custom tracking or Unbounce’s plan for world domination. I can’t decide yet. 🙂

But in all seriousness, it’s a field with a style set to display:none and that’s why it’s being picked up by Hotjar. 

You can remove it since it will always be filled in. 

Best,
Hristian

Perhaps we should start an ‘Unbounce Community Hotjar Tips & Tricks’ thread.

The recordings tool is great for watching visitors interact with pages of a website. Just remember to make sure you don’t change the CSS file name. Otherwise the recording don’t display with the style sheet loaded correctly!

This is cool Hristian, I’ve not used the Form part of Hotjar yet.

Your welcome!

Userlevel 6
Badge +4

After my initial test I can confirm that this is a great addition to actionable insight. As an example I discovered that my forms drop-down received most interaction - hence possibly moving it to the top of the form would have some effect…

My form has 4 fields, but I noticed 5th field was added. Is this my submit button? See attached.

Good to know about cross-domain tracking. That would be a huge help for a lot of our pages. Appreciate the tips!

Perfect, exactly the feedback I was looking for. Thanks!

Userlevel 7
Badge +3

Hi Andrew, 

I’ve used Hotjar on a few pages and I must say more people should be using it.
Great tool, that’s affordable and easy to use. 

Beyond the obvious heatmaps, the recordings and forms features, given enough traffic can provide you with valuable insights on how your visitors are interacting with your page.

Definetly give it a try and let us know what you think. 

Best,
Hristian

 

Somehow I knew you would chime in here. Thanks for the feedback, we are going to try it out on a few pages first but it looks promising.

Thanks! Will do!

Reply