Recently I had to run a Hotjar poll after a successful signup uncovering hooks. We wanted to ask users what persuaded them to sign up. But our registration is not happening on a dedicated thank-you page – there’s a GTM data layer event which is loaded when a signup happens.
On the Targeting step we’ll click On pages I specify and select the last option (unfortunately it will be active in paid plans only)
We’ll call the Hotjar event ‘success’, so that’s what I’ll enter here:
Start by creating a new Custom HTML tag in GTM. Give it a name and paste the following in the HTML box:
Here’s our tag, where I’ve selected an existing datalayer event for trrigger:
That’s it – just save and publish the tag in GTM and enable your poll in Hotjar!