
內容簡介
Mercury 外掛旨在解決 Pardot 表單在嵌入外部網站時的高度問題。透過一個簡單的腳本,該外掛能夠動態調整 iframe 的高度,確保表單內容不會被截斷或留下多餘空間。
【主要功能】
• 自動調整 Pardot 表單高度
• 監聽表單內容變化並更新高度
• 支援可選的高度緩衝區設置
外掛標籤
開發者團隊
② 後台搜尋「Mercury – Auto Height for Pardot Forms」→ 直接安裝(推薦)
原文外掛簡介
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.
