Sync Mailmunch form leads to Google Sheets
Capture every Mailmunch popup, topbar, scroll box, and sidebar form submission in Google Sheets for a centralized lead database your team can act on instantly.
CMS: Shopify
Overview
Mailmunch offers multiple form display types including popups, topbars, scroll boxes, sidebar widgets, and embedded forms, each injected into the DOM at different trigger points. LeadToSheet monitors for all Mailmunch form injections and captures submissions from every display type, writing them to Google Sheets so you have a unified lead record beyond Mailmunch's built-in email marketing features.
Implementation checklist
- 1
Add the SDK to your Shopify theme
Navigate to Online Store > Themes > Edit Code in your Shopify admin. Add the LeadToSheet snippet to theme.liquid before the closing </head> tag.
theme.liquid 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 each Mailmunch form type
Visit your store and interact with each active Mailmunch form: popup, topbar, scroll box, sidebar, and any embedded forms. Submit test data for each variation.
Tip: Mailmunch's form editor has a 'Test Live' button that forces the form to display immediately regardless of trigger settings.
- 3
Validate sheet columns
Open your connected Google Sheet and verify that each form type created appropriate columns. Mailmunch form fields may have generic names like 'field_1', which you can rename in the LeadToSheet dashboard.
Customization ideas
Separate leads by form placement
Mailmunch places forms in different positions (topbar, sidebar, popup). Use LeadToSheet routing rules to send each placement type to a separate sheet tab for granular performance tracking.
Merge with Mailmunch landing page data
Mailmunch includes a landing page builder. Add the LeadToSheet SDK to your Mailmunch landing page's custom code to capture signups from those pages alongside your Shopify popup data in the same sheet.
Build a unified lead funnel report
Since Mailmunch handles both lead capture and email marketing, use Sheets to compare signup volume against Mailmunch email open rates by correlating emails across both datasets.
Troubleshooting
Topbar form submits but no data appears
Mailmunch topbars use a compact form that may submit via a different mechanism than standard popups. Verify the topbar form uses a standard HTML form element by inspecting the DOM. If it uses a custom JavaScript submission that bypasses the form submit event, the SDK may not detect it. In that case, check the browser console for errors or contact support.
Scroll box not triggering capture
Mailmunch scroll boxes appear based on scroll depth. The LeadToSheet SDK must be loaded before the user reaches the scroll threshold. Placing the SDK in the <head> of theme.liquid ensures it initializes early enough.
Embedded forms on blog posts not captured
Shopify blog post templates may use a different layout than theme.liquid. Check whether your blog template extends the main layout. If not, add the SDK snippet to the blog layout file as well.
Resources
Frequently asked questions
- Does LeadToSheet work with Mailmunch's built-in email campaigns?
- LeadToSheet only captures form submissions. It does not interact with Mailmunch's email campaign sending. Your email marketing workflows continue unaffected while Sheets receives a copy of each new signup.
- Can I capture data from Mailmunch's landing pages hosted externally?
- If Mailmunch hosts the landing page on their domain, you need to add the LeadToSheet SDK via Mailmunch's custom code injection feature. If the landing page is embedded on your Shopify domain, the theme.liquid SDK handles it automatically.
- How are Mailmunch's multi-field forms handled?
- LeadToSheet captures all fields in a Mailmunch form, including name, email, phone, and any custom fields. Each field becomes a column in your Google Sheet.
