Sync Typeform WordPress Embeds to Google Sheets
Typeform's conversational forms run inside an iframe on your WordPress site. Use the LeadToSheet webhook endpoint with Typeform's webhook integration to sync every response and quiz score to Google Sheets alongside UTM attribution from your WordPress site.
CMS: WordPress
Overview
Typeform embeds render inside a cross-origin iframe, so the SDK cannot capture submissions directly from the browser. Use Typeform's webhook integration to send submission data to your LeadToSheet endpoint. The SDK still captures page-level context (UTM parameters, referrer) on the host page.
Implementation checklist
- 1
Install the LeadToSheet SDK on your WordPress site
Add the script to your theme footer or use a code injection plugin. The SDK must load on the parent page that contains the Typeform embed.
LeadToSheet snippet
<script>(function(w,d,s,u,k,e){if(w.__formsync){return}w.__formsync={q:[],k:k,endpoint:e};var js=d.createElement(s);js.src=u;js.async=1;js.onload=function(){w.__formsync.init&&w.__formsync.init({ clientKey:k })};d.head.appendChild(js);})(window,document,'script','https://www.leadtosheet.com/sdk.min.js','YOUR_CLIENT_KEY','https://www.leadtosheet.com/api/ingest');</script> - 2
Track attribution for Typeform responses
LeadToSheet excludes hidden fields (input[type='hidden']), so Typeform hidden fields for UTM parameters are not captured by the SDK. LeadToSheet does automatically capture the page URL, referrer, and UTM parameters from the parent page. For Typeform-specific hidden field data, use Typeform's built-in Google Sheets integration or webhooks.
Tip: LeadToSheet captures the parent page URL and referrer automatically, which often contains the UTM parameters you need.
- 3
Set up webhook as the primary capture method
Copy the LeadToSheet webhook URL from your dashboard and add it as a webhook in Typeform's Connect panel. This is the primary capture method for Typeform submission data since the SDK cannot read form fields inside the cross-origin iframe.
Customization ideas
Segment quiz results by score range
Typeform quiz scores land as numeric columns in your sheet. Use Google Sheets conditional formatting or formulas to categorize respondents into tiers for follow-up campaigns.
Route conversational forms to different tabs
If you embed multiple Typeforms on different WordPress pages, LeadToSheet auto-identifies each form via fingerprinting. Configure routing to dedicated sheet tabs in the LeadToSheet dashboard.
Capture respondent completion time
LeadToSheet records the timestamp of submission alongside Typeform's built-in time-to-complete metadata, letting you analyze engagement duration in your spreadsheet.
Troubleshooting
Iframe cross-origin blocks field capture
Typeform submissions are captured via the webhook integration, not the client-side SDK. If submissions are missing, verify the webhook URL is correctly configured in your Typeform builder settings.
Popup or slider embeds not triggering capture
Typeform popup and slider embed types load dynamically after user interaction. LeadToSheet uses a MutationObserver to detect when these embeds are injected. If submissions are missed, confirm the SDK loads before the popup trigger element.
Typeform hidden fields are not captured
LeadToSheet excludes hidden fields (input[type='hidden']). Typeform hidden fields passed via the embed URL are not captured by the SDK. To get this data into your sheet, use Typeform's built-in Google Sheets integration or webhook to sync hidden field values.
Resources
Frequently asked questions
- Can LeadToSheet capture partial Typeform responses?
- LeadToSheet captures on submission completion. For partial response tracking, enable Typeform's partial responses feature and use the webhook integration to sync incomplete data to a separate sheet tab.
- Does it work with the Typeform WordPress plugin?
- The SDK captures page-level context (UTMs, referrer) on the parent page. Typeform submission data is captured via the webhook integration since Typeform renders in a cross-origin iframe.
- How are multi-language Typeforms handled?
- LeadToSheet stores field labels as rendered to the respondent. For multi-language forms, columns reflect the language shown, so consider using field reference IDs for consistent column naming.
