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
- Log in to your Google Tag Manager account.
- Select the container used by your website.
- Click Tags → New.
- Give the tag a descriptive name, such as Trfyx Analytics.
- Click Tag Configuration and select Custom HTML.
- Paste the following JavaScript code into the HTML field:
- Click Triggering, select All Pages, and click Add.
- Click Save.
- 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
The tag does not fire in GTM Preview
The tag does not fire in GTM Preview
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.
Trfyx receives no data
Trfyx receives no data
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.
I see duplicate pageviews
I see duplicate pageviews
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.
Should I use GTM and a direct installation together?
Should I use GTM and a direct installation together?
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
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:- Quickstart — Set up your first Trfyx reports.
- Goals and conversions — Define the actions that matter to your business.
- Funnels — Measure where users convert or drop off.
- Troubleshooting — Diagnose missing or unexpected data.