Onsite tracking

Install the Trust ID JavaScript tag

Add the snippet to your site’s main template so it loads automatically on every page. You can install it directly or through Google Tag Manager.

No customer login required

The standard tag runs in the background. Visitors do not log in to Trust ID, create a Trust ID account, enter an OTP, or interact with a Trust ID interface.

01

Add the snippet

Place this before the closing </head> tag in your site’s main template. Replace the company, policy, terms, and logo values with your own.

HTML
<script src="https://userportal.trustid.life/trustid.iife.js"
  privacy-policy="/privacy-policy"
  terms-of-service="/terms-of-service"
  logo="/logos/trust-id-lockup.svg"
  company="Your Company, Inc."
  use-headless defer></script>

02

Or install with Google Tag Manager

  1. 1In Google Tag Manager, create a new Custom HTML tag.
  2. 2Paste the Trust ID snippet into the HTML field.
  3. 3Set the trigger to All Pages, then preview and publish the container.

If the tag will control consent for other scripts, install it directly in the head so it loads before Google Tag Manager.

03

Configure the tag

Tag attributes

AttributePurpose
companyYour company name.
privacy-policyYour privacy-policy path or URL.
terms-of-serviceYour terms-of-service path or URL.
logoYour logo path or URL.
use-headlessRuns without additional customer-facing UI. Recommended.

04

Verify the installation

  1. Open your site and launch the browser developer tools.
  2. In the Network tab, filter for trustid.iife.js.
  3. Reload the page and confirm the script returns a 200 response.
  4. Open the Trust ID dashboard and confirm the new session appears.

Next steps

We use cookies and similar technologies to measure site performance and support marketing. Optional tags load only after you choose. See our Privacy Policy.