Stickybar Form Submit - Lead tracking in GTM


I’m having a great deal of trouble trying to track the stickbar form submission as a lead in GTM.

I’ve tried to track based on

  • window.dataLayer.push (failed, doesn’t receive the push)
  • GTM Trigger based on element visibility (failed picking up stickybar, but works on other elements in the form)
  • GTM Click ID/Click Classes for the submit button (failed, doesn’t pick it up)

What I’ve determined so far as to WHY: Stickbars load through an iFrame. This is the main problem because GTM won’t pick up anything in the DOM that is within the iFrame.

How has anyone been able to solve this through GTM? It doesn’t make sense that I can’t feed conversion data from this seeing as it’s responsible for so many leads. Ideas??


Hey Adam,

I have had to work out a few kinks out in the past when using tags/tracking in iFrames. I haven’t dealt with anything in Unbounce…But! This article from another blog explains in detail what code to use and how to apply it to get the tracking to work.

Hopefully it helps to solve your troubles


Unfortunately I’ve already seen this article and it’s not possible. As per their quote, “For this to work, you need to be able to add unadulterated code on the iframe and the page the iframe is inserted on. If you’ve got a third-party service you’d like to track, and you can’t insert code snippets on their pages, this will not work and you’re out of luck.”.


Well how have you been adding code from GTM?

You mentioned you tried tracking based on a few things, did you make those code edits on your webpage? Not the stickybar, right?

You can add that article’s example “try { … formSubmit” as a script in the stickybar builder in Unbounce. Then add the larger complete script on your webpage. That is how I’m think you can accomplish this.


You were right, it worked!! Thank you!


Okay awesome :sunglasses:

Glad you got it working!