Capture MAG Form Builder data in Google Sheets
MAG Form Builder offers drag-and-drop forms with conditional logic and popup triggers. LeadToSheet syncs every text field submission to Google Sheets so you can build automations around popup forms, autoresponders, and conditional field data.
CMS: Shopify
Overview
MAG Form Builder gives Shopify merchants drag-and-drop form creation with conditional logic and popup triggers. LeadToSheet adds a real-time Google Sheets backup of every submission, including conditionally shown fields, so your team can analyse lead quality and automate follow-ups from a single spreadsheet.
Implementation checklist
- 1
Install the SDK in your Shopify theme
Go to Online Store > Themes > Edit code. Paste the SDK snippet into theme.liquid before the closing </body> tag. This covers all pages where MAG forms may appear, including popups.
LeadToSheet SDK 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
Trigger every conditional path in a test submission
MAG Form Builder supports conditional logic that shows or hides fields. Submit test entries that trigger each conditional branch so all possible column headers are created in your Google Sheet.
Tip: Create two or three test submissions with different conditional paths to populate all headers upfront.
- 3
Verify text field values appear in the sheet
Submit a test entry with all text fields filled and confirm each value appears in the corresponding Google Sheet column. Note that file upload fields are not captured by the SDK, so plan to collect attachments through a separate workflow.
Customization ideas
Route popup forms to a dedicated tab
Configure a routing rule in the LeadToSheet dashboard to send MAG popup form submissions to a dedicated sheet tab, separating popup leads from inline form submissions.
Build conditional lead scoring in Sheets
Since LeadToSheet captures which conditional fields were shown and answered, use Apps Script formulas to assign lead scores based on which questions a visitor completed.
Sync autoresponder data for deliverability tracking
Pair the MAG autoresponder emails with your sheet data to track which leads received autoresponder messages and cross-reference with conversion events in your spreadsheet.
Troubleshooting
Popup form submissions not captured
MAG popup forms render dynamically in the DOM. The LeadToSheet SDK detects dynamically injected forms automatically, but confirm the SDK is loaded in theme.liquid (not a page-specific section) so it is present before the popup triggers.
Conditional fields missing from the sheet
Fields hidden by conditional logic are not submitted by the browser. This is expected. Only fields visible to the user at submission time are captured. Submit test entries for each conditional path to create all column headers.
Conflict with MAG Form Builder's app block
If MAG Form Builder uses a Shopify app block that loads its own scripts, ensure the LeadToSheet SDK loads after the app block scripts. Placing it at the bottom of theme.liquid typically resolves timing issues.
Frequently asked questions
- Does LeadToSheet capture file uploads from MAG Form Builder?
- No. LeadToSheet captures text field values from form submissions but does not capture file uploads. Files are handled by MAG Form Builder's own storage. You can access uploaded files through the MAG Form Builder dashboard.
- Will popup form timing or display rules affect data capture?
- No. LeadToSheet captures the submission event regardless of how the form was triggered. Exit-intent popups, timed popups, and scroll-triggered forms are all captured.
- Can I use MAG Form Builder's autoresponder and LeadToSheet together?
- Yes. LeadToSheet operates independently from MAG's email features. Your autoresponders continue to fire while submissions are simultaneously synced to Google Sheets.
