Add Fathom Analytics to your Obsidian Publish site

In trying to figure out how to add analytics to my drjethro 1 site, I had to do a little digging. I was stoked to find this little page:

Today I figured out how to embed the tracking code for Fathom Analytics into an Obsidian Publish website. It’s easy.

via Micah Walter

Well, turns out it wasn’t that easy.

Obsidian lists this as the code you need to put into a publish.js file at the root of your obsidian folder:

var fathom = analyticsScript.createElement('script');
analyticsScript.defer = true;
analyticsScript.setAttribute('data-site', 'yourdomain.com');
analyticsScript.src = 'https://cdn.usefathom.com/script.js';
document.head.appendChild(analyticsScript);

That didn’t work.

Micah shared this code:

var fathomSnippet = document.createElement('script');
fathomSnippet.defer = true;
fathomSnippet.setAttribute('data-site', '<your-site-code>');
fathomSnippet.src = 'https://cdn.usefathom.com/script.js';
document.head.appendChild(fathomSnippet);

But that didn’t work for me.

I reached out to support at Fathom and Awesome Ash shared this update:

var fathomScript = document.createElement('script');
fathomScript.defer = true;
fathomScript.setAttribute('data-site', 'SITEID');
fathomScript.src = 'https://cdn.usefathom.com/script.js';
document.head.appendChild(fathomScript);

I entered that with my site code and it registered immediately.

I also use ChatGPT to help me code, since I’m new at this. And this is the code ChatGPT gave me:

var analyticsScript = document.createElement('script');
analyticsScript.defer = true;
analyticsScript.setAttribute('data-site', 'YOUR_SITE_ID_HERE');
analyticsScript.src = 'https://cdn.usefathom.com/script.js';
document.head.appendChild(analyticsScript);

Which looks identical to what Ash sent over, except ChatGPT used analyticsScript and she used fathomScript.

Ash said there was a small error in the Obsidian code:

It’s referring to ‘analyticsScript’, which isn’t ever defined, so it’s just returning ‘null’ and preventing the code in the publish.js file from running.

It also lists ‘yourdomain.com’ which I don’t think is right either. I think it has to be the SITEID, which is what I used, and what Ash recommended in her email to me. And now it’s working well on my drjethro.com site.

You see, this is a good example of where AI can sometimes be beneficial. I could have used ChatGPT to get that answer, but Ash had more context working at Fathom, and could provide clearer help and direction, so I could understand. ChatGPT’s answer was:

The issue with your JavaScript snippet is that you are creating the script element incorrectly. You should be calling document.createElement(‘script’) directly, not analyticsScript.createElement(‘script’).

You see, I don’t have the expertise to understand what the AI was saying there, but Ash explained it in a way that made sense.

  1. I can’t believe I scored that domain name! 

Notes mentioning this note

There are no notes linking to this note.


Here are all the notes in this site, along with their links, conveniently visualized as a graph.

1 tip i would give an educator to start using ai...Paperless Principal BookSimplicityCommunication CardsHome VisitsSchoolx is here. get your copy todayNowAPWorkshopPresentations and SpeakingAplusOnboardingSetting Healthy Tech Boundaries for KidsAdlerian psychology in schoolsAI Easy and HardAn 84% Pay Cut? Would You Take it?How to Combat Chronic AbsenteeismToolsOrganic Skills are the New Soft SkillsOn Lasting ForeverSites I want to model this site afterBest Year EverInstructional Coaches MastermindCUES 2014District MastermindsFamily GoalsFETC22FOCUSIdeal WeekImpactMastermindNational Principal's ConferenceObserveOnline Observation FormPhotographersPlanning PeriodASCD PlayRewire19Scales and Goals 2014SchoolXSeminarSponsorshipsSurveyTraumaUCET 2014Loaves and Fishes, not the 5,000How We Use AI In SchoolsSchoolX Book Study - Transform your School with...VERDADSonderUsing Vectorize to build an unreasonably good...Schedules are a big puzzle, and I like puzzlesNot all screen time is created equalMy Thoughts on LearningI made some big updates to the site today2 Keys to Building CommunityMaking “Social” Social AgainA decade never to be forgottenOSPI Graduation Equity Webinar3 Rules for Academic Writing with AI3 things i'm interested in right now5 best rti episodes on transformative principal5 ways our edu system would be different if...50 Questions to Ask to Solve Problems5rs5sigma20Nobody cares about our life as much as we doNew Disease: NovolibrochitatWhat I've learned from doing 6000 burpees in 40...A summary of my ship30 writingsAccelerated learningA less annoying cookie bannerAdd Fathom Analytics to your Obsidian Publish siteA Live Demo Site for a SaaS productAdntbf roadmapAdding a Little Complexity to Make Things More...AI As a Fundamental ExpectationAI Can do Anything, But Not Something SpecificAI Produces and Your Brain DevelopsAi leader office hours june 2025Advanced teacher's prompts (54)All parents want their kids to be successfulExploring Descript's Agentic EditingAn overview of prompt engineering for educatorsAnyone interested in fundraising should listen to...Argentinian Food - Fast Sunday Family Feast for...Assessment (58)Assessment and evaluation (50)Big impact mixerBook fair controversy at Prairie Hill sparks...[Big Impact Mixer] - Vision, Category Design, 10...Three reasons you should have a podcast to go with...Based on what you know about me[Big Impact Mixer] - MiraclesBIM January 25 - Breakout Problem SolvingAssumptionsBe a creator, not a consumerBIM February 2025 - Experiments[Big Impact Mixer] - Are My Social Posts Any Good?Bim april creating a personalized newsletterBIM May - What are your Gifts?Brooks duncan on handwritten notesBuilding classroom community (50)Building parent and community partnerships (50)Compass Among usElection Day, but no TrustEdit an episode with me (full podcast production...Delusional dreams of excess freedomDan koe's writer's bootcampWhy the Ebenezer is so Important in Come Thou...Building an App I will use DailyEducatorsCan we trust the ai?Candy teacher referralCaroline classroom observationTransforming Old Content into Engaging Case Study...Chatgpt prompts for educatorsClassroom creativity(55)Classroom differentiation (50)Classroom discipline (50)Classroom environment (50)Classroom gamification (50)Classroom management (52)Classroom technology integration (50)ClippingsThere’s no such thing as learning loss or learning...Collaboration (54)Convertkit essential workflowsCulturally responsive teaching (50)Data dashboardDay 1 ship30Day 17 the 1 app i can’t live without for podcast...December - Brazilian Feijoada“Your Decision, My Decision, Our Decision”: A...Differentiated instruction (100)Don't call it a Substack. - Anil DashDo People Call You for Advice?Effective feedback (54)Ethan Mollick on Knowing When to Use AIEverything AIExplicit teaching (54)How to Be a Transformative Principal By Jethro...January - MolcajeteFast Sunday Family Feast - A Jones Family...February - Borscht and PelmeniHow This Site is BuiltHow i got my wife to stop nagging meLong sentences[Big Impact Mixer] - Experiments FollowupFrameworksHoliness to the Lord in Everyday LifeFit looks like gritLearning is like a springFollowing up on my post ai counselor botsJethro's Appearances and Media ElsewhereLearning is a lifelong processIrish Food - March 2025Guatemalan Food for April 2025FSFF May 2025 - Korean FoodIf I were a ProfessorFSFF June 2025 - Good Ol' American FoodHow i got started in leadershipHow I lost 70 Pounds in a Sustainable WayHow i would start my online presence todayHow I write a dissertation extremely fastHow writing helped me present betterHow to use mint mobile's minternational passShould I use AI for to Install Omarchy on a...Just subscribe to these youtube channelsI was quoted in a story from Parents MagazineLeadership vs managementLesson planning (50)NewslettersListen LaterLucky MeatMiraclesMove from blogtalkradio to transistorDoes Magic Mind really give you clean and calm...Notes to staciObsidianOur System is Designed to Enable CheatingPaperless principal submittedPaperless principalParent Teacher communication (50)PatiencePedagogical approaches (50)Pedagogy and instructional strategies (100)Podcast gearPolson middle schoolPresentations on aiPraiseProblem in edu is that we don’t have outcome Based...Professional growth and development (50)Project ManagementPromoting ethical decision Making and responsible...Recipes on the Web are the WORST!Read ai summary from the vaesp lunch and learnRssAsk QuestionsQuoting Cory DoctorowCurriculumHomeStudents Who ThriveEnrollmentHow it worksSstHow we told families school doesn't matter and...SchoolX Book Study - Transform your School with...Save the webSessions Health - Mental Health Practice...Self EsteemShould i learn to codeStop using generative AI as a search engineSponsored Podcast EpisodeWhen the Stone turns to BreadStrivingStudent engagement and motivation (100)Student Centered learning (50)Students Need Human Relationships to Thrive. Why...Summer pinedaSupporting students transition and college and...SynergyTailgate - February 2025The leaders who have influenced me mostThe lord keeps things hiddenThe man who saved the world with human intuition,...The pass method how i've taught ai to be an...The power of no expectationsThe power of personality tests in the hiring...The best book i've read on business financeThe best piece of leadership advice i ever...This Is Mind Blowing.TherapyThree simple tips for recording yourself more...Trying to Export SubstackTo Radiate Life A Prayer by Elbert HubbardTop 3 podcasts in 2019Knowing how to use Transcripts in Podcasts in 2025Turning learning upside downUse of data to inform practice (50)VAESP Presentation ResourcesVal meditation reminder appWhy everyone should read the courage to be...Why do AI company logos look like buttholes?Why young people worldwide want and need...Spiritual ArchitectureYou Can Just LearnYou choose to not changeYou made up your angerPresentation Notes at ALASBOPresentation Notes at Alaska Municipal LeagueBe Podcast NetworkBest AI ToolsBishop Brady High School AI PresentationBlogBooksCommunication CardsThe Ultimate Inspirational Videos for Teachers and...Eliminate Stress and Improve Relationships in Just...BUHSD Day of LearningDesigners for EducationTeachers Don't Actually Want Feedback. Here's What...You Should be Able to Take Your Data With YouHard thingsHumilityiA Presenter Now Allows Sharing on the WebExperimentsProject iSTAR: An Integrated Strategic,...High Rep WorkoutsFacebook adsHow to get unstuck when you're stuckHow Many Teachers Do I Need To Hire For Social...media kitLifestyle is your choiceHow we teach our kids does not happen how we thinkThe Little, Narrow Prison of Language: The...Morning RoutinePaper trackingPbis As MedicinePeople Ruin the InternetPersonal board of advisorsPodcast AppearancesAll Learning Is SpiritualProjectsPsychological SafetyReopening Schools WorkshopResultsSdlSecret newsletterSubscribeSure Go AheadTake Your Daughter To Work DayThanksThe KindleTrauma Podcast MapUcet2013Your Values are Only Worth What You’re Willing to...UCET 2023Supporting Students with Webs of Support - Podcast...Where To Startand An Action ItemWhy I Do What I DoWhy Most Reopening Plans Are Doomed To FailWorld Down Syndrome Awareness DayYoutube For Schools“Put Your Shoulder to the Wheel”
Follow
Follow
Follow