By Gatedleads team · October 27, 2026
How to Gate Content on Shopify
To gate content on Shopify behind an email address, embed a gated page in a Custom Liquid section using the theme editor. Shoppers see a preview of your guide on your store page, enter their email, and the full content or the PDF download appears in the same place. Shopify's own forms collect signups well, but they are built around growing a subscriber list rather than handing over a specific resource in exchange.
What Shopify offers on its own
Shopify has good tools for collecting emails. Shopify Forms lets you build popup or inline signup forms that grow your subscriber list and build customer segments, and most themes include a newsletter signup in the footer.
What those forms are not designed to do is keep a guide, a size chart, a care manual or a recipe pack hidden on the page until the form is filled in. For that, you need a gated page, and the simplest way to put one inside a Shopify store is through a theme section that accepts custom code.
Check your theme first
Shopify's help centre explains that if your theme offers a Custom Liquid section, you might be able to add code there in the theme editor instead of editing your theme code directly. Many current themes include one, but not all do, so check the list of sections when you add one in Step 3. Your theme's own documentation will also say if it has a Custom Liquid or custom HTML section.
If your theme has no such section, use the link method at the end of this post. It needs no theme changes at all.
Embedding is also a Gatedleads Pro feature, so on the Free plan the link method is the one to use.
Step 1: Build the gated page
Create the page in Gatedleads with a headline, a short preview, the gate and the content that appears after someone signs up. If you are offering a PDF, add a File download block so it downloads once the email is in. A template saves time here, and since the page will sit inside your store design, you only need the content itself.
Publish the page and test it on its own link first. If your lead magnet is a download, requiring an email to download a PDF covers the file side in more detail.
Step 2: Copy the embed code
In the Gatedleads editor, open the Settings tab, find Embed on your site and click Copy embed code. The snippet loads your page into an iframe, resizes it to fit the content, passes any UTM tags on your store page's address through to Gatedleads, and records your store page as the traffic source.
Step 3: Add a Custom Liquid section
Shopify's guide to sections and blocks describes adding a section in the theme editor. For a gated page:
- From your Shopify admin, open Online Store, then Themes, and click Customize on your current theme.
- Choose the template where the gated content should go from the drop-down at the top of the editor. This might be a specific page, a blog post template or the home page.
- Click Add section in the sidebar and choose Custom Liquid.
- Paste the full snippet into the section's code box.
- Drag the section into position, then click Save.
Shopify recommends duplicating your theme before changing theme code. Adding a section in the editor is a lighter change than editing code, but a duplicate is still a sensible backup if you are new to the theme editor.
Paste the snippet exactly as copied. One Shopify Community thread describes a Custom Liquid section with a broken iframe tag, a missing closing bracket, hiding the sections below it, so a careless edit to the code is the most likely thing to go wrong.
Step 4: Test it on the live store
Open the live store page in a private browser window, so you see what a shopper sees. Enter a test email, confirm the gated content or the PDF appears, and check the page on a phone as well. Then look at the lead in your Gatedleads dashboard, where it should show your store page as its source.
If your store is password protected while you set it up, test after it is open, or preview the theme and check the page there.
Ideas for gated content on a store
Gated content on a store works best when it helps shoppers choose or use what you sell.
- A buying guide for your main product category, such as how to choose a running shoe for your gait.
- A care or setup guide for products that need looking after, such as cast iron pans or houseplants.
- A recipe or project pack that uses your products.
- A size or fit guide with more detail than the product page has room for.
Lead magnets for ecommerce has more ideas, with examples of how stores follow up after the download.
Placement tips
- Put it near the product it supports. A care guide on a collection page or below a product description gets more attention than one buried in a blog archive.
- Use one gated section per page. Two forms on one page split attention, and a popup on top of an embedded form is easy to overdo.
- Give it full width on mobile. The embed fills the section's width and grows to fit its content, so it does not need a fixed height.
The free alternative: link to the gated page
On the Gatedleads Free plan, or with a theme that has no Custom Liquid section, publish the gated page on its own link and add a button to your store that points to it. Most themes let you add a button or a link in a rich text or image banner section. Shoppers go to the Gatedleads page for the step of entering their email, and the gated content, PDF delivery and lead tracking work in the same way. Add UTM tags to the link to see which store page sent each lead. UTM links for lead magnets explains how.
How to gate content without code covers this standalone setup in more detail.
Using another platform?
The same embed code works elsewhere, with different steps. See how to gate content on Wix, how to gate content on Squarespace and how to gate content on WordPress.
Create your gated page free and try it on its own link before adding it to your store.
FAQ
Can Shopify gate content without an app?
Not in the lead magnet sense. Shopify's forms collect signups, and some stores restrict pages to logged in customers, but there is no built-in way to keep part of a page hidden until a shopper enters an email.
What if my theme has no Custom Liquid section?
Link to the gated page from a button instead. It works on any theme and any Gatedleads plan, and it needs no changes to your theme.
Do the leads go into Shopify customers?
Not automatically. Leads are stored in Gatedleads. You can export them as a CSV, or on Pro send each new lead on through Zapier to the tool you use for email.
Will the embed slow down my store?
The embed loads one iframe with your gated page in it, in the section where you place it. Test the page after adding it, as you would with any new section.