Skip to main content

I am embedding a convertible popup on our site. I am wondering if there is a mechanism I can use to collect additional information as part of the lead. For example if the user clicks ‘Yes’ in the popup can I collect information from the parent page such as window.data.valuea, window.data.valueb


I can think of a couple convoluted ways of doing this but am curious if there are any best practices or patterns that exist already.


Thanks,


John

@johnresaas you can console.log(window.ub) on the pop to see what elements are available by default. if what you are lookin for isnt available then perhaps you can use hooks.



depends what u are after… hope this helps!


Hey @johnresaas,


Unbounce popups are loaded as iFrames so essentially you’ll need 2 scripts. One on the parent page and one in the popup.


The parent page would get the data you need and “send” it to the iframe. The popup script would then get that data and do whatever you want with it.


Here is an example our agency wrote a while back. It should get you 95% of the way, you’ll just have to adjust it to fit your particular need and the data you are after.


Best,

Hristian


Reply