Capture HubSpot WP Plugin Forms in Google Sheets
The official HubSpot WordPress plugin renders forms through HubSpot's JS engine inside your theme. LeadToSheet intercepts those submissions so your team gets real-time spreadsheet access without exporting from HubSpot CRM.
CMS: WordPress
Overview
The HubSpot WordPress plugin injects forms via a JavaScript embed rather than native HTML, which means the form DOM is generated dynamically after page load. LeadToSheet detects the HubSpot form lifecycle events and captures field values on successful submission, giving you a live Google Sheets mirror of every lead without relying on HubSpot's export tools or API limits.
Implementation checklist
- 1
Add the LeadToSheet SDK to your theme
Place the script tag in your theme footer or use a header/footer injection plugin. It must load on every page where HubSpot forms appear.
LeadToSheet snippet
<script src="https://cdn.leadtosheet.com/sdk.min.js" data-client="YOUR_CLIENT_KEY"></script> - 2
Verify HubSpot plugin form rendering
Open any page with a HubSpot form in DevTools and confirm the form is rendered inside a div with class `hbspt-form`. LeadToSheet hooks into HubSpot's `onFormSubmit` callback automatically.
Tip: If you use the Gutenberg HubSpot block, the form loads via AJAX after page paint. LeadToSheet handles this with a MutationObserver, so no extra config is needed.
- 3
Submit a test lead and check your sheet
Fill in the form with sample data. Confirm that columns match HubSpot's internal field names (e.g. `firstname`, `company`) and that progressive profiling fields appear when triggered.
Customization ideas
Map progressive profiling stages
HubSpot rotates fields based on known contacts. Submit from both anonymous and known sessions so LeadToSheet creates all possible column headers upfront.
Route popup vs. embedded forms
HubSpot popup forms and inline forms fire different events. Use `data-leadtosheet-tab` on the container to send popup leads to a separate sheet tab for nurture sequences.
Preserve HubSpot tracking context
LeadToSheet captures the `hutk` cookie value alongside form data so you can correlate Google Sheets rows with HubSpot contact timelines.
Troubleshooting
Form renders but submissions are not captured
The HubSpot WP plugin loads forms asynchronously via the HubSpot JS API. Make sure the LeadToSheet SDK loads before or alongside the HubSpot embed script. If a caching plugin defers the SDK, switch to async loading with the `async` attribute.
Dependent fields not appearing in the sheet
Dependent (conditional) fields in HubSpot forms are only included in the payload when they are visible at submission time. Submit a test that triggers every dependent branch to pre-create all column headers.
Duplicate rows from non-HubSpot form plugins
If you also run Contact Form 7 or WPForms on the same page, LeadToSheet may capture both. Use form-level selectors in the LeadToSheet dashboard to scope capture to HubSpot forms only.
Frequently asked questions
- Does this replace the HubSpot CRM connection?
- No. Leads still flow into HubSpot CRM as normal. LeadToSheet provides an additional copy in Google Sheets for reporting, sharing with teams who lack HubSpot seats, or triggering automations in tools like Zapier or Make.
- Are GDPR consent fields captured?
- Yes. HubSpot consent checkboxes and communication preferences are captured as boolean columns so you can audit compliance directly in your spreadsheet.
- Will it work with HubSpot's non-WordPress embed code?
- This guide is specific to the WP plugin. For standalone HubSpot embeds on other platforms, see the general HubSpot Forms guide.
