Install FastAnalytics with Google Tag Manager
If your site already loads Google Tag Manager, you can add FastAnalytics without touching the code.
Create the tag
- In GTM, go to Tags > New.
- Choose Custom HTML and paste your script.
- Trigger: Initialization – All Pages (or All Pages).
- Name it “FastAnalytics” and save.
- 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
Install the FastAnalytics tracking scriptHow to add FastAnalytics to any website in two minutes: get your FA code, paste one line before the closing head tag and check that visits arrive in real time.Read →3 minCheck your installation and fix missing visitsHow to check that FastAnalytics is working, why visits might not appear (domains, ad blockers, caching, Content Security Policy) and how to exclude your own visits.Read →4 minInstall FastAnalytics on WordPressTwo ways to add FastAnalytics to WordPress: a header-code plugin (no coding) or a small snippet in your child theme. Works with any theme and page builder.Read →3 min