Building a website using the Remix.run web app framework? This tutorial will teach you how to add privacy-first analytics to your Remix site with Fathom.
How to set up Fathom on your Remix site
Sign into your account with Fathom, and create a new site.
Open the settings for that site, and look for Script settings. Hit the clipboard icon to copy the Script tag for your site.
Open up your Remix site in your IDE of choice. open
return (<html lang="en"><head><Meta /><Links /></head><body><Layout><Outlet /></Layout><ScrollRestoration /><scriptsrc="https://cdn.usefathom.com/script.js"data-site="TRSSCIOR"defer/><Scripts /><LiveReload /></body></html>);
Note: ☝🏽 I've edited the
<script> tag here to be self closing, rather than having
<script></script>. It should work either way.
- Start your site with
npm run devor
yarn devand visit any page (you may have to hit reload if you had the page open already). You should see this reflected in your fathom dashboard in real time!
Try out Fathom - it's great!
I've been using Fathom for years, and am a happy paying customer. If you'd like to give it a shot, you can get $10 off of Fathom when you use my referral link https://usefathom.com/ref/DPSSYB to get started.