{"id":416297,"date":"2026-11-28T10:34:51","date_gmt":"2026-11-28T10:34:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/formwake-for-hubspot\/"},"modified":"2026-11-28T11:46:53","modified_gmt":"2026-11-28T11:46:53","slug":"formwake-for-hubspot","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/formwake-for-hubspot\/","author":23615105,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.3.0","stable_tag":"0.3.0","tested":"7.1.5","requires":"6.3","requires_php":"7.4","requires_plugins":null,"header_name":"FormWake for HubSpot","header_author":"Borko Labs","header_description":"Lazy-loads forms from the new HubSpot form editor, keeps them independent of marketing consent and pushes clean dataLayer events for GTM.","last_updated":"2026-11-28 11:46:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":34,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1.0":{"tag":"0.1.0","author":"cedricborkowski","date":"2026-11-28 10:40:13","revision":3831240},"0.2.0":{"tag":"0.2.0","author":"cedricborkowski","date":"2026-11-28 10:57:32","revision":3831258},"0.3.0":{"tag":"0.3.0","author":"cedricborkowski","date":"2026-11-28 11:46:53","revision":3831326}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3831222,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3831222,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3831222,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3831222,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0","0.2.0","0.3.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3831258,"resolution":"1","location":"assets","locale":"","width":2220,"height":2642},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3831222,"resolution":"2","location":"assets","locale":"","width":2560,"height":1430},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3831222,"resolution":"3","location":"assets","locale":"","width":1413,"height":853},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3831222,"resolution":"4","location":"assets","locale":"","width":1746,"height":720}},"screenshots":{"1":"Settings page: status box, all options in clear sections and a help sidebar with the shortcode to copy.","2":"A HubSpot form embedded with the [formwake] shortcode. The HubSpot script only loads when the form comes close to the viewport.","3":"Google Tag Manager preview: the hubspot_form_submit event with form_id, instance_id, conversion_id and page_path.","4":"A GTM Custom Event trigger on hubspot_form_submit \u2013 all you need to fire GA4 or Google Ads conversion tags."}},"plugin_section":[],"plugin_tags":[43896,601,23294,8904,4884],"plugin_category":[42],"plugin_contributors":[296098],"plugin_business_model":[],"class_list":["post-416297","plugin","type-plugin","status-publish","hentry","plugin_tags-datalayer","plugin_tags-forms","plugin_tags-google-tag-manager","plugin_tags-hubspot","plugin_tags-lazy-load","plugin_category-contact-forms","plugin_contributors-cedricborkowski","plugin_committers-cedricborkowski"],"banners":{"banner":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/banner-772x250.png?rev=3831222","banner_2x":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/banner-1544x500.png?rev=3831222","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/icon-128x128.png?rev=3831222","icon_2x":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/icon-256x256.png?rev=3831222","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/screenshot-1.png?rev=3831258","caption":"Settings page: status box, all options in clear sections and a help sidebar with the shortcode to copy."},{"src":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/screenshot-2.png?rev=3831222","caption":"A HubSpot form embedded with the [formwake] shortcode. The HubSpot script only loads when the form comes close to the viewport."},{"src":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/screenshot-3.png?rev=3831222","caption":"Google Tag Manager preview: the hubspot_form_submit event with form_id, instance_id, conversion_id and page_path."},{"src":"https:\/\/ps.w.org\/formwake-for-hubspot\/assets\/screenshot-4.png?rev=3831222","caption":"A GTM Custom Event trigger on hubspot_form_submit \u2013 all you need to fire GA4 or Google Ads conversion tags."}],"raw_content":"<!--section=description-->\n<p>FormWake for HubSpot embeds forms built with HubSpot's updated form editor without the official HubSpot plugin. It focuses on three things:<\/p>\n\n<ul>\n<li><strong>Performance:<\/strong> 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).<\/li>\n<li><strong>Cookie banners:<\/strong> the form script can be exempted from marketing consent blocking via a filter, so forms keep working for visitors who decline marketing cookies.<\/li>\n<li><strong>GTM tracking:<\/strong> form events are pushed to <code>window.dataLayer<\/code> as <code>hubspot_form_ready<\/code>, <code>hubspot_form_submit<\/code> and <code>hubspot_form_error<\/code> (names configurable). Only IDs and the page path are sent \u2013 never field values or other personal data.<\/li>\n<\/ul>\n\n<p>Assets are only loaded on pages that actually contain a form. No jQuery, no build step, no HTTP requests from PHP.<\/p>\n\n<h4>Benchmark<\/h4>\n\n<p>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.<\/p>\n\n\n\n\n  Metric\n  HubSpot embed\n  FormWake\n\n\n\n\n  Transferred data\n  2,486 KB\n  367 KB (\u221285 %)\n\n\n  Requests to HubSpot\n  72\n  0\n\n\n  Page fully loaded (load event)\n  14.7 s\n  3.6 s (\u221276 %)\n\n\n  Largest Contentful Paint\n  3.8 s\n  3.4 s (\u221210 %)\n\n\n  Total Blocking Time\n  203 ms\n  30 ms (\u221285 %)\n\n\n\n\n<p>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 \u2013 it still skips the forms further down the page (\u221245 % transferred data in the same test). Results depend on your page, theme and hosting.<\/p>\n\n<p>This plugin is not affiliated with or endorsed by HubSpot, Inc.<\/p>\n\n<h4>Requirements in HubSpot<\/h4>\n\n<ul>\n<li>The form must be created with the <strong>updated<\/strong> HubSpot form editor. Legacy forms are not supported.<\/li>\n<li>Add your website domain in HubSpot under the tracking code \/ domain settings. HubSpot marks submissions from domains that are not added as spam.<\/li>\n<li>The developer embed (no iframe) requires a Marketing Hub or Content Hub Professional or Enterprise subscription.<\/li>\n<\/ul>\n\n<h4>Usage<\/h4>\n\n<p>Enter your portal ID and region under <strong>Settings \u2192 FormWake<\/strong>. Then add the shortcode to any page (works in the block editor's Shortcode block, Elementor, Divi and classic content):<\/p>\n\n<pre><code>[formwake id=\"FORM-UUID\" min_height=\"400\"]\n<\/code><\/pre>\n\n<ul>\n<li><code>id<\/code> (required): the form ID (UUID) from the HubSpot embed code (<code>data-form-id<\/code>).<\/li>\n<li><code>min_height<\/code> (optional, default 400, max 3000): placeholder height in pixels to avoid layout shift.<\/li>\n<\/ul>\n\n<h4>dataLayer payload<\/h4>\n\n<pre><code>{ event, form_id, instance_id, page_path, conversion_id }\n<\/code><\/pre>\n\n<p>The <code>conversion_id<\/code> field is only included on successful submissions. <code>page_path<\/code> contains the path without query string.<\/p>\n\n<h4>Cookie banner exceptions<\/h4>\n\n<p>Use the <code>formwake_script_attributes<\/code> filter to add attributes your consent tool needs to leave the scripts alone:<\/p>\n\n<pre><code>add_filter( 'formwake_script_attributes', function ( $attributes, $context ) {\n    $attributes['data-cookieconsent'] = 'ignore'; \/\/ Cookiebot\n    return $attributes;\n}, 10, 2 );\n<\/code><\/pre>\n\n<p>The <code>$context<\/code> parameter is <code>loader<\/code> (this plugin's own script tags) or <code>embed<\/code> (the HubSpot form script). Please check with your legal advisor whether loading the HubSpot form script without consent is acceptable for your use case.<\/p>\n\n<h3>External services<\/h3>\n\n<p>This plugin embeds forms from <strong>HubSpot<\/strong> (HubSpot, Inc.), an external service. Without it, the plugin has no function.<\/p>\n\n<ul>\n<li><strong>What is loaded:<\/strong> the HubSpot form embed script from <code>js.hsforms.net<\/code> (region na1) or <code>js-{region}.hsforms.net<\/code> (e.g. <code>js-eu1.hsforms.net<\/code>). This script then loads the form and further resources from HubSpot domains.<\/li>\n<li><strong>When:<\/strong> only on pages that contain the <code>[formwake]<\/code> shortcode \u2013 with lazy loading enabled, only once a form comes close to the visible area of the page.<\/li>\n<li><strong>What data is sent:<\/strong> 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.<\/li>\n<li>HubSpot terms of service: https:\/\/legal.hubspot.com\/terms-of-service<\/li>\n<li>HubSpot privacy policy: https:\/\/legal.hubspot.com\/privacy-policy<\/li>\n<\/ul>\n\n<p>The dataLayer events are only written to the <code>window.dataLayer<\/code> 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.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code> or install it via Plugins \u2192 Add New.<\/li>\n<li>Activate the plugin.<\/li>\n<li>Configure it under Settings \u2192 FormWake.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20it%20work%20with%20legacy%20hubspot%20forms%3F\"><h3>Does it work with legacy HubSpot forms?<\/h3><\/dt>\n<dd><p>No. FormWake supports forms from the updated HubSpot form editor only.<\/p><\/dd>\n<dt id=\"where%20do%20i%20find%20the%20form%20id%20and%20region%3F\"><h3>Where do I find the form ID and region?<\/h3><\/dt>\n<dd><p>In HubSpot, open the form and click \"Get embed code\". The code contains <code>data-form-id<\/code>, <code>data-portal-id<\/code> and <code>data-region<\/code>.<\/p><\/dd>\n<dt id=\"do%20multiple%20forms%20on%20one%20page%20work%3F\"><h3>Do multiple forms on one page work?<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt id=\"does%20it%20work%20in%20popups%2C%20tabs%20and%20accordions%3F\"><h3>Does it work in popups, tabs and accordions?<\/h3><\/dt>\n<dd><p>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 <code>window.formwake.scan( element )<\/code> after inserting the form markup.<\/p><\/dd>\n<dt id=\"debug%20mode%20shows%20nothing\"><h3>Debug mode shows nothing<\/h3><\/dt>\n<dd><p>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.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.3.0<\/h4>\n\n<ul>\n<li>Each form now loads on its own when it comes close to the viewport (previously all forms loaded with the first one).<\/li>\n<li>Forms in popups, tabs and accordions load when they become visible.<\/li>\n<li>Forms inserted later via JavaScript are detected automatically; new <code>window.formwake.scan()<\/code> for custom scripts.<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Settings page redesign: status box, sections as cards, help sidebar with copy-to-clipboard shortcode, GTM and cookie banner tips.<\/li>\n<li>Admin CSS\/JS are loaded on the FormWake settings page only.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Initial release: settings page, shortcode, lazy loading, dataLayer events, script attribute filter.<\/li>\n<\/ul>","raw_excerpt":"Lazy-load forms from HubSpot's new form editor, keep them working with cookie banners and send clean dataLayer events to GTM.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/416297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=416297"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cedricborkowski"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=416297"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=416297"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=416297"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=416297"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=416297"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=416297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}