Heap / Mixpanel Popup Event Tracking

We use Heap Analytics to track engagement with our site & landing pages.

We’ve run into an issue tracking Heap events inside Unbounce popups - in that it doesn’t track.

We want to track popup form submissions (send an submission event to Heap when a form’s submitted). Has anyone done this successfully in Heap or Mixpanel?

Hey @billyplacer,

Unbounce popups are essentially iFrames for all intents and purposes.

What do you do to implement the necessary scripts inside these popups? What do you do on the Heap side to target these different popups?

Best,
Hristian

I’ve added the scripts in the Javascript section of each popup. There’s a special flag that’s needed in the Heap code to make it work inside iframes.

We want to track two things on a form submission:

  1. Track a Heap event “Form Submitted”
  2. Make a Heap identify call with the submitter’s email address to tie the submission event to a user

Adding the normal Heap event track & identify codes doesn’t seem to work inside the popups. I have a workaround for #1 (see below) but not #2. I was wondering if anyone has a solution.

I track visits to the iframe successfully & add pageview events through Heaps UI. This means that for #1, I can mark the form confirmation dialog pageview event as a “Form Submission.”

Thanks