Shogun + Shopify guide

Sync Shogun page builder forms to Sheets

Capture form block submissions from Shogun-built landing pages, product pages, and blog posts in Google Sheets for centralized lead tracking across your entire store.

CMS: Shopify

Shogun is a premium Shopify page builder with visual editing, form blocks, A/B testing, and content scheduling. LeadToSheet captures submissions from Shogun's form blocks as they render on published pages, giving you a Google Sheets record of leads from custom landing pages, product sections, and A/B test variants without relying on Shogun's limited native form handling.

Implementation checklist

  1. 1

    Add the SDK to theme.liquid

    In your Shopify admin, open Online Store > Themes > Edit Code and add the LeadToSheet snippet before the closing </head> tag in theme.liquid.

    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. 2

    Publish your Shogun page and test

    Shogun's visual editor does not execute external scripts. Publish the page and visit the live URL to submit a test form. Verify the submission appears in your Google Sheet.

    Tip: If you use Shogun's A/B testing, submit test data on both variants to ensure column headers are created for each version.

  3. 3

    Check multi-store consistency

    If you manage multiple Shopify stores with Shogun, add the SDK to each store's theme.liquid and connect each to its own Google Sheet or a shared sheet with store-specific tabs.

Customization ideas

  • Track A/B test conversions in Sheets

    Shogun supports A/B testing page variants. LeadToSheet captures the page URL (which may include a variant parameter) so you can compare form conversion rates between variants directly in Sheets.

  • Capture scheduled content form data

    Shogun's content scheduling publishes pages at specific times. LeadToSheet captures form submissions as soon as the page goes live, so you can monitor lead flow during time-sensitive campaigns.

  • Track campaigns with visible fields

    LeadToSheet excludes hidden fields (input[type='hidden']), so adding hidden form fields for campaign tracking will not work. Instead, use Shogun's custom code block to add visible read-only text fields, or rely on the page URL and referrer data that LeadToSheet captures automatically.

Troubleshooting

  • Forms in Shogun editor preview do not trigger captures

    Shogun's visual editor loads pages in an isolated environment that does not include theme.liquid scripts. This is expected behavior. Always test form capture on the published page URL, not in the Shogun editor.

  • Form block submissions redirect before capture

    If your Shogun form block is configured to redirect to a thank-you page on submission, LeadToSheet uses sendBeacon to fire the data before the browser navigates away, so the redirect should not affect capture. If submissions are still missing, switch the form block to show an inline success message instead of redirecting.

  • Custom code sections with forms not detected

    Shogun's custom code blocks render HTML directly. If your custom form uses a non-standard submission method (e.g., fetch API without a form element), wrap it in a standard <form> tag so LeadToSheet can detect the submission event.

Frequently asked questions

Does LeadToSheet work with Shogun Frontend (headless)?
Shogun Frontend renders pages server-side with a custom framework. You can add the LeadToSheet SDK to Shogun Frontend's global layout component to capture forms, but the integration requires adding the script tag to the React/Next.js head rather than theme.liquid.
Can I capture forms from Shogun blog post templates?
Yes. If your Shogun blog post template includes a form block (e.g., a newsletter signup), LeadToSheet captures those submissions just like any other page-level form.
How does Shogun's form handling compare to using LeadToSheet?
Shogun's native form handling sends submissions to email notifications. LeadToSheet adds a Google Sheets destination so you can build reporting, automation, and CRM pipelines from the same submission data.