Learn how to properly add the Marketo Measure JavaScript to a form within a lightbox.
A lightbox opens a form in front of your content when the visitor performs a specific action (i.e., clicking on a particular portion of the page, spending a certain period of time on the page, etc.). Typically we just ask to have the Marketo Measure JavaScript placed in the head of the landing page, but for forms within a lightbox there’s one extra step needed.
Since a form within a lightbox is basically a form within an iFrame, we’ll need our script placed within that iFrame.
First, locate the iFrame the lightbox form lives in.
Next, place the Marketo Measure JavaScript within the iFrame.
Finally, when the JavaScript is added, we encourage you to validate form submissions are being tracked by following these directions: