Overview
Formstack serves enterprise teams with advanced features like electronic signatures, document generation, A/B testing, and HIPAA/PCI compliance. Its forms can be embedded via JavaScript or iframe on any website. LeadToSheet adds UTM parameters, referrer data, and device context that Formstack's own reporting does not surface, giving marketing teams a spreadsheet-native view of lead attribution alongside form responses.
Implementation checklist
- 1
Add the LeadToSheet SDK to your embed page
Place the script tag on the page where your Formstack form is embedded. Formstack's JS embed renders the form in the page DOM, enabling native capture by LeadToSheet.
LeadToSheet snippet
<script src="https://cdn.leadtosheet.com/sdk.min.js" data-client="YOUR_CLIENT_KEY"></script> - 2
Use the JavaScript embed for native capture
Formstack provides both iframe and JavaScript embed codes. The JavaScript embed renders form fields directly in your page DOM, which lets LeadToSheet detect and capture submissions without cross-origin limitations.
Tip: Find the JS embed code in Formstack under Publish > Embed > JavaScript. Copy both the noscript fallback and the script tag.
- 3
Run an A/B test submission to verify both variants
If you use Formstack's A/B testing, submit test entries through each variant. LeadToSheet captures the variant identifier so you can compare conversion rates by form version inside your Google Sheet.
Customization ideas
Capture document generation metadata
Formstack can generate documents from form submissions. Use Apps Script in your Google Sheet to append the document download URL to the row once Formstack's document generation webhook fires.
Track electronic signature completion
When Formstack forms include e-signature fields, LeadToSheet records the signature status and timestamp. Pair this with UTM data to analyze which marketing channels produce the most signed agreements.
Segment by A/B test variant in Sheets
Formstack's A/B testing assigns users to form variants. LeadToSheet captures the variant ID, letting you build pivot tables in Sheets to compare completion rates and field values across experiments.
Troubleshooting
JavaScript embed form not detected
Formstack's JS embed loads the form asynchronously after page render. Ensure the LeadToSheet SDK is loaded before or alongside the Formstack script so it can observe DOM mutations. If the form still is not captured, add a small delay attribute: data-delay='2000' on the LeadToSheet script tag.
Iframe embed cross-origin capture
If you use the Formstack iframe embed, LeadToSheet cannot access form fields due to cross-origin restrictions. Switch to the JS embed, or configure Formstack's webhook integration (Settings > Integrations > Webhooks) to POST to your LeadToSheet webhook endpoint.
HIPAA forms require additional configuration
For HIPAA-compliant forms, ensure your Google Sheet and Google Workspace account meet BAA requirements. LeadToSheet does not store PHI on its servers. Data flows directly to your designated Google Sheet, but your Sheets environment must also be HIPAA-ready.
Frequently asked questions
- Can LeadToSheet capture Formstack A/B test data?
- Yes. When using the JS embed, LeadToSheet captures the test variant assigned to each respondent. You can filter and compare variants directly in Google Sheets.
- Does this work with Formstack's workflow automation?
- LeadToSheet operates independently of Formstack's internal workflows. Your approval chains, routing rules, and notification emails continue to function normally while LeadToSheet writes a parallel copy to Google Sheets.
- Is Formstack's PCI compliance affected?
- LeadToSheet captures the form fields rendered in the browser DOM. Sensitive payment card fields processed by Formstack's PCI-compliant payment processor are tokenized before they reach the DOM, so raw card numbers are never exposed to LeadToSheet.
