ENES Start free trial

Install FastAnalytics with Google Tag Manager

If your site already loads Google Tag Manager, you can add FastAnalytics without touching the code.

FastAnalytics team · Updated · 3 min read

Create the tag

  1. In GTM, go to Tags > New.
  2. Choose Custom HTML and paste your script.
  3. Trigger: Initialization – All Pages (or All Pages).
  4. Name it “FastAnalytics” and save.
  5. Click Preview to test, then Submit to publish.
<script>window.hm=window.hm||function(){(window.hm.q=window.hm.q||[]).push(arguments)};</script>
<script defer src="https://e.fastanalytics.site/e.js" data-id="FA-XXXXXXXXXX"></script>

Single-page apps

Do not fire the tag on History Change triggers. The script already counts route changes; firing it again would load it twice and double your page views.

Loading through GTM is slightly later than pasting the script in your HTML, and visitors who block GTM will not be measured. Pasting it directly is the most complete option.

FAQ

Does GTM add cookies?

Google Tag Manager itself does not need cookies to load FastAnalytics, but other tags in your container might. Check your container if you plan to remove the cookie banner.

Keep reading