In Shopify admin go to Online Store › Themes. Shopify recommends duplicating your theme before editing code: click … › Duplicate on your current theme.
2
Step 2: Open the code editor
On your current (live) theme, click … › Edit code.
Screenshot coming soonThe theme's three-dot menu in Shopify with Edit code highlighted
3
Step 3: Open theme.liquid
In the file list, open layout/theme.liquid. You can search for it with Ctrl+P (Cmd+P on a Mac).
Screenshot coming soonShopify's code editor with layout/theme.liquid open
4
Step 4: Paste the line before </head>
Find the line </head> and paste the Formleak line just above it.
Screenshot coming soontheme.liquid with the Formleak script pasted just above the closing head tag
Paste it just before </head> in layout/theme.liquid.
Click Save. Changes to your live theme apply straight away.
6
Step 6: Check it's working
Open a page on your live site that has a form and click into a field. Then open your website in Formleak: the setup check turns green as soon as data arrives.
Shopify only lets you edit the code of a paid theme you own. Theme trials can't be edited.
Checkout pages don't use your theme, so forms on checkout aren't tracked. Contact, newsletter, account and other store forms are.
Don't paste the line into Shopify's “Customer events” custom pixels. Those run in a sandbox without access to your page, so Formleak can't see your forms there.
Updating or switching your theme can drop code edits. Check the line is still there afterwards.