Sync Typeform on Shopify to Google Sheets
Typeform's one-question-at-a-time experience embedded on your Shopify store creates engaging surveys and quizzes. LeadToSheet captures every response with hidden Shopify customer data and delivers it to Google Sheets in real time.
CMS: Shopify
Overview
Typeform Embed renders conversational forms inside an iframe on your Shopify storefront. Typeform renders inside a cross-origin iframe, so the SDK cannot capture submissions directly. Use Typeform's webhook integration to send responses and quiz scores to your external automation endpoint. Note that hidden fields (input[type='hidden']) are excluded by the SDK; use Typeform's built-in integrations or webhooks to sync hidden field values pre-filled with Shopify customer data. This replaces Typeform's limited native Sheets connector with a solution that includes storefront attribution and device context.
Implementation checklist
- 1
Add the LeadToSheet SDK to theme.liquid
Go to Online Store > Themes > Edit code. Paste the SDK snippet into theme.liquid before </body>. The SDK needs to load on the parent Shopify page to listen for Typeform's embed events.
LeadToSheet SDK snippet
<script async src="https://www.leadtosheet.com/api/sdk?k=YOUR_CLIENT_KEY"></script> - 2
Link responses to Shopify customers via Typeform
In Typeform's form builder, add hidden fields for customer_id, customer_email, or product_handle and populate them via the embed URL using Liquid variables. Note that LeadToSheet excludes hidden fields, so use Typeform's built-in Google Sheets integration or webhooks to sync these values into your sheet.
Tip: Example embed URL: https://yourform.typeform.com/to/abc123#customer_id={{customer.id}}&product={{product.handle}}
- 3
Submit a test response and verify the sheet
Complete the Typeform on your Shopify storefront and check that the response and Shopify page URL appear as columns in your Google Sheet. Note that hidden fields are excluded by LeadToSheet; verify those separately via Typeform's own integrations.
Customization ideas
Score quiz responses for product recommendations
If you use Typeform quizzes to recommend products, LeadToSheet captures the calculated score and individual answers. Use Apps Script to match scores to product SKUs and generate personalized follow-up emails.
Segment survey responses by Shopify customer
LeadToSheet excludes hidden fields (input[type='hidden']), so Shopify customer IDs passed via Typeform hidden fields are not captured by the SDK. To join Typeform responses with Shopify customer data for cohort analysis, use Typeform's built-in Google Sheets integration or webhooks to sync hidden field values into a separate sheet tab.
Track which storefront pages drive completions
LeadToSheet records the Shopify page URL where the Typeform embed was completed. Build a pivot table to see which product pages, blog posts, or landing pages generate the most Typeform responses.
Troubleshooting
Typeform iframe cross-origin issues
Typeform embeds load from typeform.com inside an iframe. Typeform submissions are captured via the webhook integration, not the client-side SDK. The SDK captures page-level UTM parameters and referrer data on the parent page.
Typeform hidden fields are not captured
LeadToSheet excludes hidden fields (input[type='hidden']), so Typeform hidden fields passed via the embed URL are not captured by the SDK. To get hidden field data into your sheet, use Typeform's built-in Google Sheets integration or webhook. If Liquid variables in your Shopify theme are not resolving, check that the embed is placed in a context where {{ customer.id }} is available (the customer must be logged in).
Partial completions not captured
Typeform's onSubmit event fires only on full completion. Partial responses are not sent to LeadToSheet. If you need partial data, configure Typeform's webhooks to send intermediate responses to the external automation endpoint.
Frequently asked questions
- Does LeadToSheet replace Typeform's native Google Sheets integration?
- It can. LeadToSheet captures the same response data plus storefront context (page URL, referrer, UTM parameters, device info) that Typeform's native connector does not include. Most merchants disable the native connector to avoid duplicate rows.
- Can I pass Shopify product data into Typeform hidden fields?
- You can use Liquid variables in your theme template to populate the Typeform embed URL with product handles, variant IDs, collection names, or customer tags. However, LeadToSheet excludes hidden fields (input[type='hidden']), so these values are not captured by the SDK. Use Typeform's built-in Google Sheets integration or webhooks to sync hidden field data into your sheet.
- How are Typeform quiz scores handled in Google Sheets?
- Typeform calculated fields and score variables are captured as standard field values. They appear as columns in your Google Sheet where you can apply formulas, filters, or conditional formatting.
