Product

Install Website Visitor Identification with Google Tag Manager

Deploy Leadpipe through Google Tag Manager in minutes — no dev required. Step-by-step GTM setup, trigger config, and how to verify it's firing.

Nicolas CanalNicolas Canal··8 min read
Install Website Visitor Identification with Google Tag Manager

If your site already runs Google Tag Manager, you don’t need a developer, a deploy, or a plugin to start identifying anonymous B2B visitors. You can add person-level website visitor identification as a single Custom HTML tag and have it live in about five minutes.

GTM is the cleanest place to deploy Leadpipe for most teams: all your marketing tags live in one container, non-developers can manage it, and — critically — GTM has consent controls built in, so gating the tag for EU traffic is straightforward.

This guide walks through the exact setup: creating the tag, firing it on every page, handling consent mode, and verifying it’s actually firing before you publish. No code beyond a copy-paste snippet.


What you’ll deploy

Leadpipe identifies anonymous visitors by loading one lightweight, asynchronous script. When a US B2B visitor arrives, Leadpipe matches their signals deterministically against its own proprietary identity graph and returns a verified named contact — work email, company, title, LinkedIn, page views — or nothing at all when there’s no confident match. No form fill, no statistical guessing.

Your unique snippet lives in your Leadpipe dashboard under Install. It looks something like this:

<script
  src="https://cdn.leadpipe.com/v1/lp.js"
  data-site="YOUR_SITE_ID"
  async
></script>

Copy the real one from your dashboard — don’t retype the example. In GTM you’ll wrap this in a Custom HTML tag and fire it on every page.

In one sentence: Deploying Leadpipe via GTM means one Custom HTML tag, one All-Pages trigger, and one Preview-mode check — no developer required.


Why GTM is the right deploy method

Deploy method No dev? Central tag management Built-in consent gating
Google Tag Manager Yes Yes Yes
Header-and-footer plugin (CMS) Yes No Depends on CMS
Direct theme / code edit No No No

If you’re on WordPress and not already running GTM, a header-and-footer plugin is simpler — see how to add visitor identification to WordPress. On Webflow, you can inject the script in site settings — see the Webflow integration guide. But if GTM is already on your site, use it: consent handling alone makes it worth it.


Step 1: Create the Custom HTML tag

  1. Open your GTM container and go to Tags → New.
  2. Name it clearly, e.g. Leadpipe — Visitor Identification.
  3. Click Tag Configuration → Custom HTML.
  4. Paste your Leadpipe snippet (the full <script> tag) into the HTML box.
  5. Leave “Support document.write” unchecked — the script is async and doesn’t need it.

That’s the tag. Next, tell it when to fire.


Step 2: Fire it on all pages

Identification needs to run on every page, not just the homepage — pricing, product, blog, and deep landing pages are exactly where buying intent shows up.

  1. In the tag, click Triggering.
  2. Choose the built-in All Pages trigger (type: Page View).
  3. Save the tag.

Which Page View trigger should you use? The default All Pages trigger fires on the initial DOM load, which is right for Leadpipe. If your site is a single-page app (SPA) where “pages” change without a full reload, you’ll also want a History Change trigger so identification re-fires on route changes. For most classic multi-page sites, plain All Pages is correct.

In one sentence: Use the built-in All Pages (Page View) trigger for standard sites; add a History Change trigger only if you’re on a single-page app.


If you serve EU/EEA or UK traffic, this step matters. Google Consent Mode v2 lets GTM gate tags based on the visitor’s consent state, and Leadpipe should respect it.

At a high level:

  • US traffic: In most B2B US contexts you can fire on all pages. US privacy law (CCPA/CPRA) is opt-out-based rather than opt-in — see CCPA-compliant visitor identification — so gating behavior differs from the EU.
  • EU/EEA/UK traffic: Gate the tag behind consent. In GTM, open the tag’s Advanced Settings → Consent Settings and add the appropriate Additional consent checks so the tag only fires when the relevant consent (e.g. analytics_storage / your CMP’s signal) is granted.

This is the single biggest advantage of deploying through GTM: consent gating is native, so you don’t have to hand-roll conditional loading. For the full walkthrough of consent states, tag gating, and EEA-vs-US handling, see Google Consent Mode v2 and visitor identification. For the EU legal framing, see GDPR-compliant visitor identification.

One honest note on coverage: person-level identification is strongest for US B2B traffic, where match rates run 30–40%. In the EU/UK, coverage is lower and often company-level, and consent obligations are stricter. Configure GTM to reflect that reality rather than firing identically everywhere.


Try Leadpipe free with 500 leads →


Step 4: Verify it’s firing (Preview mode)

Never publish blind. GTM’s Preview mode (Tag Assistant) confirms the tag fires before it goes live.

  1. In GTM, click Preview and enter your site URL.
  2. Your site opens with Tag Assistant connected.
  3. Navigate across a few pages — homepage, a blog post, your pricing page.
  4. In the Tag Assistant panel, confirm Leadpipe — Visitor Identification shows under Tags Fired on every page you visit (not just the first).
  5. Cross-check in browser DevTools → Network: filter for lp.js (or leadpipe) and confirm a 200 status on each page.

If the tag shows under Tags Not Fired, your trigger is wrong — double-check it’s set to All Pages. If it fires only on the homepage, you likely attached it to a page-specific trigger by mistake.


Step 5: Submit and publish

Once Preview confirms the tag fires site-wide with a 200:

  1. Click Submit in GTM.
  2. Add a version name like Add Leadpipe visitor identification.
  3. Publish the container.

Then watch your Leadpipe dashboard over the next 24–48 hours as live traffic flows and identified accounts start landing. A quick real-world test: visit your own site from a corporate network and look for the session — home-IP/personal-device visits often won’t match, which is expected deterministic behavior, not a bug.


Common GTM mistakes

  • Tag fires but nothing shows in the dashboard. Usually a consent-gating issue — the tag is blocked behind a consent signal that never grants. Check Consent Settings and your CMP.
  • Fires only on the homepage. Wrong trigger. It must be All Pages, not a URL-specific Page View.
  • Forgot to publish. Preview mode uses an unpublished workspace. If it works in Preview but not live, you didn’t hit Publish.
  • SPA routes don’t re-fire. On a single-page app, add a History Change trigger so identification runs on client-side navigation.
  • Duplicate installs. If you also have the snippet hard-coded in the site and in GTM, remove one — double-firing wastes requests and can skew data.

Once it’s live, the real value is in routing identified visitors somewhere useful — Slack alerts, your CRM, or Zapier automations. See how to easily identify anonymous website visitors for the bigger picture.


FAQ

Do I need a developer to install Leadpipe with GTM?

No. If GTM is already on your site, everything above is copy-paste and clicks inside the GTM interface — create a Custom HTML tag, set the All Pages trigger, preview, and publish. The only “code” is the snippet you copy from your Leadpipe dashboard. A developer is only needed to add GTM itself if it isn’t installed yet.

What trigger should the Leadpipe tag use?

The built-in All Pages trigger (type: Page View) for standard multi-page sites — identification needs to run everywhere, not just the homepage. If your site is a single-page application where routes change without a full reload, add a History Change trigger too so the tag re-fires on client-side navigation.

GTM’s native consent settings let you gate the Leadpipe tag by consent state. For EU/EEA/UK traffic, add consent checks so it fires only when the relevant consent is granted; US B2B traffic can generally fire on all pages under CCPA’s opt-out model. The full walkthrough is in Google Consent Mode v2 and visitor identification.

How do I verify the tag is actually firing?

Use GTM Preview mode: navigate several pages and confirm the Leadpipe tag appears under Tags Fired on each one. Cross-check in browser DevTools → Network for an lp.js request returning 200. Then confirm identified sessions appear in your Leadpipe dashboard within 24–48 hours of publishing.

Can I use GTM if I’m also on WordPress or Webflow?

Yes — GTM is platform-agnostic. If GTM is already installed, use it regardless of CMS. If it isn’t, WordPress users can use a header-and-footer plugin instead, and Webflow users can inject the snippet in site settings. Just don’t install via both GTM and a direct snippet, or the tag will double-fire.


Get it live today

Google Tag Manager is the fastest, most flexible way to deploy visitor identification: one Custom HTML tag, an All Pages trigger, native consent handling, and a Preview-mode check before you publish. No deploy, no developer, no waiting.

Copy your snippet, follow the five steps, verify it fires, and start turning anonymous traffic into named, deterministically-matched B2B contacts.

Try Leadpipe free — 500 identified leads, no credit card required.