[WordPress] 外掛分享: FormWake for HubSpot

首頁 › 外掛目錄 › FormWake for HubSpot
WordPress 外掛 FormWake for HubSpot 的封面圖片
全新外掛
安裝啟用
—
尚無評分
剛更新
最後更新
—
問題解決
WordPress 6.3+ PHP 7.4+ v0.8.0 上架:2026-11-27

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.8.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「FormWake for HubSpot」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

FormWake for HubSpot embeds HubSpot forms (from the updated and the legacy form editor) and HubSpot meeting schedulers without the official HubSpot plugin. It focuses on three things:

Performance: the HubSpot form script is only loaded when a form comes close to the viewport (IntersectionObserver). A placeholder with a fixed minimum height prevents layout shift (CLS).
Cookie banners: pick your cookie banner in the settings and the scripts are exempted from marketing consent blocking, so forms keep working for visitors who decline marketing cookies. Other consent tools: via a filter.
GTM tracking: form events are pushed to window.dataLayer as hubspot_form_ready, hubspot_form_submit and hubspot_form_error (names configurable). Only IDs and the page path are sent – never field values or other personal data.

Assets are only loaded on pages that actually contain a form. No jQuery, no build step, no HTTP requests from PHP.
Benchmark
The same landing page with two HubSpot forms below the fold, once with HubSpot’s official embed code and once with FormWake. Simulated mid-range phone (4x CPU slowdown, 1.6 Mbit/s, 150 ms latency, empty cache), visitor stays at the top for 10 seconds. Median of 5 runs.
HubSpot embed → FormWake:

Transferred data: 2,486 KB → 367 KB (−85 %)
Requests to HubSpot: 72 → 0
Page fully loaded (load event): 14.7 s → 3.6 s (−76 %)
Largest Contentful Paint: 3.8 s → 3.4 s (−10 %)
Total Blocking Time: 203 ms → 30 ms (−85 %)

The forms still load as soon as a visitor scrolls towards them. If a form is visible right away, FormWake cannot make that form faster – it still skips the forms further down the page (−45 % transferred data in the same test). Results depend on your page, theme and hosting.
This plugin is not affiliated with or endorsed by HubSpot, Inc.
Requirements in HubSpot

Forms from the updated HubSpot form editor work as they are. For forms from the legacy editor, add legacy="1" to the shortcode.
Add your website domain in HubSpot under the tracking code / domain settings. HubSpot marks submissions from domains that are not added as spam.
The developer embed (no iframe) requires a Marketing Hub or Content Hub Professional or Enterprise subscription.

Usage
Enter your portal ID and region under Settings → FormWake.
Block editor: add the block “HubSpot form (FormWake)” or “HubSpot meeting (FormWake)” and paste the embed code from HubSpot (or the form ID / meeting link). The editor shows a placeholder and loads nothing from HubSpot; on the page the block behaves exactly like the shortcode.
Shortcode (Elementor, Divi, classic content and the block editor’s Shortcode block):
[formwake id="FORM-UUID" min_height="400"]

id (required): the form ID (UUID) from the HubSpot embed code (data-form-id).
min_height (optional, default 400, max 3000): placeholder height in pixels to avoid layout shift.
legacy (optional): set to 1 for a form from HubSpot’s legacy form editor. Its embed code contains hbspt.forms.create.

For a HubSpot meeting scheduler, use your meeting link from HubSpot → Meetings (no portal ID needed):
[formwake_meeting url="https://meetings-eu1.hubspot.com/your-name"]

url (required): your HubSpot meeting link (meetings.hubspot.com or meetings-eu1.hubspot.com). You can paste the data-src from HubSpot’s embed code – parameters such as prefilled properties (?interesse_an=…) are kept. Use fixed values only – never personal data like an email address, as the link is visible in the page source.
min_height (optional, default 700, max 3000): placeholder height in pixels.

To prefill personal values (e.g. from a link in an email), add them to the page URL instead, e.g. /contact/?email=… – HubSpot’s meetings script passes the page’s URL parameters to the scheduler. Note that such URLs also end up in server logs and analytics tools.
dataLayer payload
{ event, form_id, instance_id, page_path, conversion_id }

The conversion_id field is only included on successful submissions. Legacy forms send no instance_id. page_path contains the path without query string.
Cookie banner exceptions
Under Settings → FormWake → Cookie banner, choose the consent tool your site uses. What each choice does:

Real Cookie Banner: adds consent-skip-blocker="1". Tested with FormWake.
CookieYes: blocks scripts by their address, so an attribute does not help. In CookieYes, open the Cookie Manager and move the HubSpot cookies (script URL pattern with hsforms.net) to “Necessary”. Tested with FormWake.
Cookiebot: adds data-cookieconsent="ignore". Based on Cookiebot’s documentation, not tested with FormWake yet.
Usercentrics: adds data-uc-allowed="true". Based on Usercentrics’ documentation, not tested with FormWake yet.
OneTrust: adds data-ot-ignore. Based on OneTrust’s documentation, not tested with FormWake yet.
Complianz and Borlabs Cookie: nothing to add – they block scripts in the page HTML, while FormWake inserts the HubSpot scripts later in the browser. Not tested with FormWake yet; if forms are still blocked, check the HubSpot entries in your consent tool.

The preset applies to forms only. Meeting schedulers keep following your cookie banner, because HubSpot loads its own tracking code inside the scheduler iframe (in our tests, forms did not load HubSpot’s tracking code). FormWake never touches the HubSpot tracking code itself – the hubspotutk cookie stays under your cookie banner’s control.
The settings page also shows which cookie banner plugins it detected on your site – it never chooses one for you. If you keep forms blocked until consent instead, FormWake loads them as soon as the visitor consents, without a page reload.
For other consent tools, use the formwake_script_attributes filter to add the attributes they need to leave the scripts alone (it receives the attributes of the chosen preset and can change them):
add_filter( 'formwake_script_attributes', function ( $attributes, $context ) {
$attributes['data-cookieconsent'] = 'ignore'; // Cookiebot
return $attributes;
}, 10, 2 );

The $context parameter is loader (this plugin’s own script tags), embed (the HubSpot form scripts) or meetings (the HubSpot meetings script; it gets no preset). Please check with your legal advisor whether loading the HubSpot form script without consent is acceptable for your use case.
External services
This plugin embeds forms from HubSpot (HubSpot, Inc.), an external service. Without it, the plugin has no function.

What is loaded: the HubSpot form embed script from js.hsforms.net (region na1) or js-{region}.hsforms.net (e.g. js-eu1.hsforms.net), for legacy forms HubSpot’s v2.js from the same host. This script then loads the form and further resources from HubSpot domains.
When: only on pages that contain the [formwake] shortcode – with lazy loading enabled, only once a form comes close to the visible area of the page.
What data is sent: loading the script transmits the visitor’s IP address, browser information and the page URL to HubSpot, as with any external resource. When a visitor submits a form, the entered form data is sent to HubSpot and stored in the site owner’s HubSpot account. The plugin itself does not send any data to HubSpot from the server.
Meeting schedulers: the [formwake_meeting] shortcode loads HubSpot’s meetings embed script from static.hsappstatic.net and the scheduler page from meetings.hubspot.com / meetings-{region}.hubspot.com – only once the scheduler comes close to the visible area. When a visitor books a meeting, the entered data is sent to HubSpot and stored in the site owner’s HubSpot account.
Google reCAPTCHA: if CAPTCHA is enabled for a form in HubSpot, HubSpot’s form script also loads Google reCAPTCHA, which in turn loads fonts from fonts.gstatic.com. This transmits the visitor’s IP address and browser information to Google. FormWake cannot prevent this – turn off CAPTCHA in the form’s settings in HubSpot if you do not want it. Google terms of service: https://policies.google.com/terms – Google privacy policy: https://policies.google.com/privacy
HubSpot terms of service: https://legal.hubspot.com/terms-of-service
HubSpot privacy policy: https://legal.hubspot.com/privacy-policy

The dataLayer events are only written to the window.dataLayer array in the visitor’s browser. No data is sent to Google or any other service unless the site owner has installed Google Tag Manager (or a similar tool) separately.

延伸相關外掛

文章
Filter
Mastodon