Shield · GTM

Google Tag Manager integration

Install Shield via the official tag template or a Custom HTML tag, and act on risk results straight from the dataLayer.

Official tag template

The easiest install — no HTML editing.

Download findip-shield.tpl and import it via GTM → Templates → Tag Templates → New → ⋮ → Import. Site key, auto-track, privacy mode, and dataLayer push are configured fields. Trigger: All Pages.

Identify the visitor (optional)

Expand the tag's Identify the visitor section and point its fields at the variables your site already exposes for logged-in users, typically the Data Layer Variables you use for GA4's user_id:

FieldWhat to selectWhat Shield receives
User IDe.g. {{DLV - userId}}user_id_hash — SHA-256 of the ID
Email addresse.g. {{DLV - userEmail}}email_hash — SHA-256 of the lowercased address, plus email_domain
Plane.g. {{DLV - plan}} or a constantplan
Hash saltan optional secret stringmixed into both hashes: SHA-256(salt + ':' + value)

The SDK hashes the values in the browser before anything is sent. The raw user ID and email never leave the page. To find the account behind a hash shown in the dashboard, compute the same SHA-256 (with the same salt) in your own system. See Identify users and add context.

Custom HTML tag

The plain alternative. Load the SDK and call FindIP.init() from onload. Trigger: All Pages; leave "Support document.write" unchecked.

<script>
(function () {
  var s = document.createElement('script');
  s.src = 'https://cdn.findip.net/shield/v1.js';
  s.async = true;
  s.onload = function () {
    if (window.FindIP) {
      window.FindIP.init({
        siteKey: 'pub_xxxxxxxxx',
        autoTrack: true,
        privacyMode: 'balanced',
        pushToDataLayer: true
      });
    }
  };
  document.head.appendChild(s);
})();
</script>

With visitor identification

To attach your own user to each session, add an identify option to the init call with your GTM variables. GTM substitutes {{Variable}} references inside Custom HTML before the tag runs, and the SDK hashes the values in the browser, so Shield never receives the raw ID or email. The dashboard's Install page generates the full tag with your site key filled in. See Identify users and add context for what each field becomes.

window.FindIP.init({
  siteKey: 'pub_xxxxxxxxx',
  autoTrack: true,
  privacyMode: 'balanced',
  identify: {
    userId: '{{DLV - userId}}',
    email: '{{DLV - userEmail}}',
    plan: '{{DLV - plan}}'
  }
});

Do not use the data-site-key attribute form inside GTM. GTM re-creates every <script> in a Custom HTML tag and keeps only src, type, charset and id. All data-* attributes are dropped, so the SDK loads but never initializes and no events are sent. The attribute form is only for a script tag placed directly in your page HTML. While testing, add debug: true to the init options to log every event to the console.

dataLayer events

Create a trigger on event equals findip_risk_result to act on risk scores.

{
  event: 'findip_risk_result',
  findip_session_id: 'sess_xxx',
  findip_visitor_id: 'vis_xxx',
  findip_request_id: 'req_xxx',
  findip_risk_score: 87,
  findip_risk_level: 'high',
  findip_recommendation: 'challenge',
  findip_is_vpn: true,
  findip_is_proxy: false,
  findip_is_tor: false,
  findip_is_relay: false,
  findip_is_hosting: true,
  findip_is_malicious: false,
  findip_country: 'US',
  findip_asn: 12345
}

Passing context via dataLayer

The SDK reads allowlisted fields from existing entries.

dataLayer.push({
  email_domain: 'gmail.com',
  plan: 'enterprise',
  user_id_hash: 'sha256_hash_here',
});

Push these before the Shield tag fires; the first value found for each key wins. Full field list, hashing guidance, and troubleshooting: Identify users and add context.

Consent mode & troubleshooting

// On consent granted
FindIP.setConsent(true);

// On consent denied
FindIP.setConsent(false);
SDK loads but no events, no _fip_* cookiesYou used the data-site-key attribute form in a Custom HTML tag. Switch to the onload + init snippet above or to the official template.
Disable dataLayer pushpushToDataLayer: false in init, or the template's dataLayer toggle
GTM detectionThe SDK auto-detects GTM via google_tag_manager or dataLayer presence.