Title: FormWake for HubSpot
Author: borkolabs
Published: <strong>November 28, 2026</strong>
Last modified: November 28, 2026

---

Search plugins

![](https://ps.w.org/formwake-for-hubspot/assets/banner-772x250.png?rev=3831222)

![](https://ps.w.org/formwake-for-hubspot/assets/icon-256x256.png?rev=3831222)

# FormWake for HubSpot

 By [borkolabs](https://profiles.wordpress.org/cedricborkowski/)

[Download](https://downloads.wordpress.org/plugin/formwake-for-hubspot.0.3.0.zip)

 * [Details](https://wordpress.org/plugins/formwake-for-hubspot/#description)
 * [Reviews](https://wordpress.org/plugins/formwake-for-hubspot/#reviews)
 *  [Installation](https://wordpress.org/plugins/formwake-for-hubspot/#installation)
 * [Development](https://wordpress.org/plugins/formwake-for-hubspot/#developers)

 [Support](https://wordpress.org/support/plugin/formwake-for-hubspot/)

## Description

FormWake for HubSpot embeds forms built with HubSpot’s updated form editor 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:** the form script can be exempted from marketing consent blocking
   via a filter, so forms keep working for visitors who decline marketing cookies.
 * **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.

 Metric
 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

 * The form must be created with the **updated** HubSpot form editor. Legacy forms
   are not supported.
 * 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**. Then add the shortcode
to any page (works in the block editor’s Shortcode block, Elementor, Divi and classic
content):

    ```
    [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.

#### dataLayer payload

    ```
    { event, form_id, instance_id, page_path, conversion_id }
    ```

The `conversion_id` field is only included on successful submissions. `page_path`
contains the path without query string.

#### Cookie banner exceptions

Use the `formwake_script_attributes` filter to add attributes your consent tool 
needs to leave the scripts alone:

    ```
    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) or `embed` (
the HubSpot form script). 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`). 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.
 * 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.

## Screenshots

[⌊Settings page: status box, all options in clear sections and a help sidebar with
the shortcode to copy.⌉⌊Settings page: status box, all options in clear sections
and a help sidebar with the shortcode to copy.⌉[

Settings page: status box, all options in clear sections and a help sidebar with
the shortcode to copy.

[⌊A HubSpot form embedded with the [formwake] shortcode. The HubSpot script only
loads when the form comes close to the viewport.⌉⌊A HubSpot form embedded with the[
formwake] shortcode. The HubSpot script only loads when the form comes close to 
the viewport.⌉[

A HubSpot form embedded with the [formwake] shortcode. The HubSpot script only loads
when the form comes close to the viewport.

[⌊Google Tag Manager preview: the hubspot_form_submit event with form_id, instance_id,
conversion_id and page_path.⌉⌊Google Tag Manager preview: the hubspot_form_submit
event with form_id, instance_id, conversion_id and page_path.⌉[

Google Tag Manager preview: the hubspot_form_submit event with form_id, instance_id,
conversion_id and page_path.

[⌊A GTM Custom Event trigger on hubspot_form_submit – all you need to fire GA4 or
Google Ads conversion tags.⌉⌊A GTM Custom Event trigger on hubspot_form_submit –
all you need to fire GA4 or Google Ads conversion tags.⌉[

A GTM Custom Event trigger on hubspot_form_submit – all you need to fire GA4 or 
Google Ads conversion tags.

## Installation

 1. Upload the plugin folder to `/wp-content/plugins/` or install it via Plugins  Add
    New.
 2. Activate the plugin.
 3. Configure it under Settings  FormWake.

## FAQ

### Does it work with legacy HubSpot forms?

No. FormWake supports forms from the updated HubSpot form editor only.

### Where do I find the form ID and region?

In HubSpot, open the form and click “Get embed code”. The code contains `data-form-
id`, `data-portal-id` and `data-region`.

### Do multiple forms on one page work?

Yes. Each form loads on its own when it comes close to the viewport, so a form further
down the page costs nothing until the visitor scrolls there. The HubSpot script 
itself is loaded only once per page.

### Does it work in popups, tabs and accordions?

Yes. A form inside a hidden element (closed popup, inactive tab, collapsed accordion)
loads when it becomes visible. Forms that a theme or page builder inserts later 
via JavaScript are detected automatically. If a custom script needs it, call `window.
formwake.scan( element )` after inserting the form markup.

### Debug mode shows nothing

Debug output is only printed for logged-in administrators. If you use a page cache
that also caches pages for logged-in users, exclude administrators from caching.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“FormWake for HubSpot” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ borkolabs ](https://profiles.wordpress.org/cedricborkowski/)

[Translate “FormWake for HubSpot” into your language.](https://translate.wordpress.org/projects/wp-plugins/formwake-for-hubspot)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/formwake-for-hubspot/),
check out the [SVN repository](https://plugins.svn.wordpress.org/formwake-for-hubspot/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/formwake-for-hubspot/)
by [RSS](https://plugins.trac.wordpress.org/log/formwake-for-hubspot/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.3.0

 * Each form now loads on its own when it comes close to the viewport (previously
   all forms loaded with the first one).
 * Forms in popups, tabs and accordions load when they become visible.
 * Forms inserted later via JavaScript are detected automatically; new `window.formwake.
   scan()` for custom scripts.

#### 0.2.0

 * Settings page redesign: status box, sections as cards, help sidebar with copy-
   to-clipboard shortcode, GTM and cookie banner tips.
 * Admin CSS/JS are loaded on the FormWake settings page only.

#### 0.1.0

 * Initial release: settings page, shortcode, lazy loading, dataLayer events, script
   attribute filter.

## Meta

 *  Version **0.3.0**
 *  Last updated **3 minutes ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.3 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [datalayer](https://wordpress.org/plugins/tags/datalayer/)[forms](https://wordpress.org/plugins/tags/forms/)
   [google tag manager](https://wordpress.org/plugins/tags/google-tag-manager/)[hubspot](https://wordpress.org/plugins/tags/hubspot/)
   [lazy load](https://wordpress.org/plugins/tags/lazy-load/)
 *  [Advanced View](https://wordpress.org/plugins/formwake-for-hubspot/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/formwake-for-hubspot/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/formwake-for-hubspot/reviews/)

## Contributors

 *   [ borkolabs ](https://profiles.wordpress.org/cedricborkowski/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/formwake-for-hubspot/)