Google Forms on Wix guide

Capture Google Forms on Wix in Sheets

Google Forms embedded on Wix via iframe offers free surveys and data collection, but strict cross-origin restrictions limit direct capture. LeadToSheet provides a webhook-based solution for automatic Google Sheets sync.

CMS: Wix

Google Forms is the go-to free form tool for surveys, registrations, and data collection. On Wix, Google Forms are embedded via iframe using a Custom HTML element. Because Google Forms iframes enforce strict cross-origin security, the LeadToSheet SDK cannot capture submissions directly from the embedded form. Instead, LeadToSheet leverages Google Apps Script triggers on the form's linked Google Sheet to add attribution metadata and sync data to your centralized LeadToSheet spreadsheet, giving you enriched submission records with page and campaign context.

Implementation checklist

  1. 1

    Add the LeadToSheet SDK via Wix Custom Code

    Go to Settings → Custom Code → Add Custom Code. Paste the script, choose All Pages, and set placement to Body – End. While the SDK cannot capture submissions inside the Google Forms iframe, it captures the page URL and UTM parameters that can be correlated with form responses.

    Wix Custom Code snippet

    <script src="https://cdn.leadtosheet.com/sdk.min.js" data-client="YOUR_CLIENT_KEY"></script>
  2. 2

    Embed Google Forms on your Wix page and configure a webhook

    Paste the Google Forms iframe embed code into a Wix HTML embed element. Then open the Google Form, go to Responses → Link to Sheets, and add a Google Apps Script on-form-submit trigger that forwards each response to your LeadToSheet webhook URL.

    Tip: The Google Forms iframe is fully sandboxed by Google. The Apps Script webhook is the reliable path for capturing every response with LeadToSheet.

  3. 3

    Test a submission and verify enriched data in your sheet

    Submit a test response through the embedded Google Form on your published Wix site. Verify the response data arrives in your LeadToSheet Google Sheet via the webhook, including any metadata your Apps Script forwards.

Customization ideas

  • Correlate Google Forms responses with Wix page traffic

    The LeadToSheet SDK on the Wix page captures visitor context (UTM parameters, referrer, page URL). Use timestamps to correlate this page-level data with Google Forms responses in your spreadsheet for a unified attribution picture.

  • Consolidate multiple Google Forms into one spreadsheet

    If you embed several Google Forms across different Wix pages, point all their Apps Script webhooks to the same LeadToSheet endpoint. Use a form identifier field in each webhook payload to distinguish them in the centralized sheet.

  • Add pre-filled fields for Wix page context

    Use Google Forms' pre-fill link feature with URL parameters that encode the Wix page name or campaign. Construct the iframe src dynamically using Velo (Wix's coding platform) to pass page-specific context into each embedded form.

Troubleshooting

  • SDK cannot capture Google Forms submissions directly

    This is expected behavior. Google Forms iframes enforce strict cross-origin policies that prevent any external script from accessing form data. Use the Google Apps Script webhook approach described in the setup checklist instead of attempting direct SDK capture.

  • Google Forms iframe displays a blank area on Wix

    Ensure the iframe embed URL uses the /viewform?embedded=true format. If the form still does not render, check that your Wix HTML embed element allows iframes and that no Content Security Policy (CSP) headers on your Wix site block the Google Forms domain.

  • Apps Script webhook not triggering on form submit

    Open the Google Forms linked spreadsheet, go to Extensions → Apps Script, and verify the on-form-submit trigger is installed and authorized. Check the Apps Script execution log for errors. Re-authorize the script if Google has revoked permissions after a recent account security change.

Frequently asked questions

Google Forms already saves to Google Sheets. Why use LeadToSheet?
Google Forms creates a separate response sheet per form. LeadToSheet consolidates all submissions across multiple forms into a single centralized spreadsheet with consistent formatting, UTM attribution, and device metadata.
Can LeadToSheet capture Google Forms responses without Apps Script?
Due to cross-origin iframe restrictions, Apps Script is the recommended path. Without it, the SDK cannot access data inside the Google Forms iframe embedded on Wix.
Is there a simpler alternative to Google Forms on Wix for Sheets integration?
Yes. Native Wix Forms or any DOM-rendered form tool (like HubSpot or Elfsight) works with the LeadToSheet SDK directly, without needing a webhook or Apps Script workaround.