Thursday, March 23, 2023
HomeReactThe best way to add Fathom Analytics to your app

The best way to add Fathom Analytics to your app

Constructing an internet site utilizing the net app framework? This tutorial will educate you find out how to add privacy-first analytics to your Remix web site with Fathom.

The best way to arrange Fathom in your Remix web site

  1. Signal into your account with Fathom, and create a brand new web site.

  2. Open the settings for that web site, and search for Script settings. Hit the clipboard icon to repeat the Script tag on your web site.

    Script settings for one of my sites on Fathom's dashboard
    You web site’s embed code shall be on the script settings web page. Hit the clipboard button to repeat the code
  3. Open up your Remix web site in your IDE of alternative. open root.tsx (or root.jsx in case you’re utilizing JavaScript as a substitute of TypeScript), and paste your embed code proper earlier than the <Script /> tag:

return (

<html lang="en">


<Meta />

<Hyperlinks />




<Outlet />


<ScrollRestoration />






<Scripts />

<LiveReload />




Observe: ☝🏽 I’ve edited the <script> tag right here to be self closing, relatively than having <script></script>. It ought to work both manner.

  1. Begin your web site with npm run dev or yarn dev and go to any web page (you’ll have to hit reload in case you had the web page open already). It’s best to see this mirrored in your fathom dashboard in actual time!
    You'll know it's working when you see a live visitor on your fathom dashboard
    You will know it is working if you see a dwell customer in your fathom dashboard

Check out Fathom – it is nice!

I have been utilizing Fathom for years, and am a contented paying buyer. If you would like to offer it a shot, you will get $10 off of Fathom if you use my referral hyperlink to get began.

Should you loved this video



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments