WordPress plugin profile

Mercury – Auto Height for Pardot Forms

Automatically resizes embedded Marketing Cloud Account Engagement (Pardot) form iframes to match their real content height.

Updated 4h ago·New active installs·★ 0.0
Version1.0.0
Tested toWP 7.1
Requires WP6.0
Requires PHP7.4
Overview

About this plugin

Important: this plugin, on its own, cannot make forms auto-height. A browser will not let one domain read the content of an iframe from another domain, and this is not really a limitation of Pardot, WordPress, or this plugin, it is simply the same-origin policy that every browser enforces. Auto-height works only once a small companion script (generated for you, please see Installation below) has also been added to your Pardot Form Layout Template. If that step is skipped, this plugin has nothing to listen for, and forms will simply keep their normal height. Marketing Cloud Account Engagement forms, still widely known by their original product name, Pardot, are usually embedded on external sites inside a fixed-height iframe. Since the form itself lives on a different domain, the parent page genuinely has no way of knowing its real content height, so tall forms get clipped, and shorter forms leave behind empty space or an unnecessary scrollbar. Mercury addresses this with a small, two-part messaging mechanism: A short script, generated by this plugin for your own domain, is added once to your Pardot Form Layout Template’s header. It measures the actual rendered height of the Pardot form page and reports it to the parent window whenever it changes, on load, on window resize, and whenever validation errors expand the form. This plugin listens for that message on your WordPress site and applies the reported height, plus an optional buffer, to the matching iframe. Requirements A Pardot or Account Engagement account with access to edit Form Layout Templates. The exact tracker (“go.”) domain your Pardot forms are served from, entered once on this plugin’s settings screen. What this plugin does not do It does not create, host, or modify Pardot forms. It does nothing until the generated code snippet has also been added to your Pardot Form Layout Template. The settings screen explains this and includes a checkbox so you can keep track of whether that step is done. Privacy This plugin makes no external HTTP requests and does not collect any data. The only communication involved is a postMessage between the Pardot iframe and the parent page, two pages you already control, carrying nothing more than a height in pixels and a form ID parsed from the form’s own URL.