Adding Marketo Measure Script to Lightbox Forms adding-marketo-measure-script-to-lightbox-forms

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 (that is, clicking a particular portion of the page, spending a certain time on the page, and so on). Typically we 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, the script is 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, validate form submissions are being tracked by following these directions:

  1. Copy the URL of the landing page containing the lightbox form.
  2. Open an Incognito browser and paste the URL.
  3. Submit the form using a unique email address.
  4. Confirm that the test was tracked by checking your CRM for the unique email address used, ensure that Touchpoint data is populating.
recommendation-more-help
9deee213-85c8-4c42-8ba8-089345b91d20