Formleak
← All install guides

Install guide

Add Formleak to Shopify

Add one line to your theme's theme.liquid file.

No cookies. Never reads what people type.

  1. Step 1: Make a backup copy of your theme

    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 soon
    The 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 soon
    Shopify'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 soon
    theme.liquid with the Formleak script pasted just above the closing head tag

    Paste it just before </head> in layout/theme.liquid.

    <script src="https://formleak.com/t.js" data-site="YOUR_SITE_KEY" defer></script>
  5. Step 5: Save

    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.

    Open the setup check

Good to know

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

Based on Shopify's own help pages: Shopify: edit theme code, Shopify: custom pixels. Menus change from time to time; if something looks different, their help pages have the latest.