Formleak
← All install guides

Install guide

Add Formleak to Google Tag Manager

Add a Custom HTML tag that fires on all pages.

No cookies. Never reads what people type.

  1. Step 1: Create a Custom HTML tag

    In Tag Manager, go to Tags › New › Tag Configuration and choose Custom HTML.

    Screenshot coming soon
    Google Tag Manager tag types with Custom HTML highlighted
  2. Step 2: Paste the Tag Manager version

    Paste the code below. It's the same Formleak line, written so Tag Manager keeps your site key. Leave Support document.write unticked.

    Paste this version (made for Tag Manager) into a Custom HTML tag.

    <script>
      (function () {
        var s = document.createElement('script');
        s.src = 'https://formleak.com/t.js';
        s.setAttribute('data-site', 'YOUR_SITE_KEY');
        s.defer = true;
        document.head.appendChild(s);
      })();
    </script>
  3. Step 3: Fire it on all pages

    Under Triggering, choose All Pages (or Initialization - All Pages to load it a little earlier). Name the tag “Formleak” and save.

    Screenshot coming soon
    The Triggering panel in Tag Manager with All Pages selected
  4. Step 4: Test, then publish

    Click Preview to check the tag fires, then Submit › Publish so it goes live.

  5. Step 5: 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

  • Use the Tag Manager version below, not the plain line: Tag Manager may drop the data-site setting from a pasted script tag.
  • A cookie banner or consent setup that blocks tags can stop Formleak loading. Formleak sets no cookies.

Based on Google Tag Manager's own help pages: Tag Manager: custom tags, Tag Manager: page view triggers. Menus change from time to time; if something looks different, their help pages have the latest.