Skip to main content

Get started with Google Tag Manager

Install Trfyx through Google Tag Manager (GTM) without changing your website’s source code. This is a good option when your team already manages analytics and marketing scripts from a central GTM container.
Before you start: Make sure you have access to the GTM container used by your production website and a Trfyx project ready to receive traffic.

Add the Trfyx tag

  1. Log in to your Google Tag Manager account.
  2. Select the container used by your website.
  3. Click Tags → New.
  4. Give the tag a descriptive name, such as Trfyx Analytics.
  5. Click Tag Configuration and select Custom HTML.
  6. Paste the following JavaScript code into the HTML field:
Replace YOUR_TRFYX_PROJECT_ID and yourdomain.com with the values for the Trfyx project you want to track. Do not copy an ID or domain from another project.
Use the Custom HTML tag exactly as shown. The <script> wrapper is required because GTM is injecting the tracker into your website. Do not paste only the JavaScript body unless your GTM configuration specifically expects it.
  1. Click Triggering, select All Pages, and click Add.
  2. Click Save.
  3. Click Submit in the top-right corner, then Publish the container.

Verify your installation

After publishing, verify the tag before relying on your analytics data.

1. Test with GTM Preview

Open Preview in Google Tag Manager and enter your production website URL. Confirm that the Trfyx Analytics tag fires when the page loads.

2. Verify the live website

Open your published website in a normal browser window and navigate through a few pages. Then open app.trfyx.com and check that incoming activity appears for the correct project.
Analytics data may take a short amount of time to appear. Make sure you are viewing the correct project, environment, hostname, and reporting date range before assuming tracking is broken.

Common problems

Check that the trigger is set to All Pages, the tag is published to the correct container, and the container is installed on the website you are testing.
Confirm that the project ID and domain are correct. Then check the browser console and Network tab for blocked scripts or requests. A Content Security Policy, consent tool, or browser extension can prevent analytics from loading.
Make sure Trfyx is installed only once. Check whether the tracker is also present in your application source code, another GTM tag, a CMS integration, or another analytics integration.
Normally, no. Choose one installation method for the same website. Installing the tracker through both GTM and your application can result in duplicate collection.

Security and privacy

Keep the GTM container restricted to trusted team members. Anyone with permission to publish a container can add or modify scripts that run on your website.
Review your consent requirements and privacy configuration before collecting production user data. If your site uses a strict Content Security Policy, make sure it permits the Trfyx script and collection requests required by your setup.

Next steps

Once tracking is verified, continue with:
Last modified on October 11, 2026