0.0.9 • Published 2 years ago

remix-fathom v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

remix-fathom

This package exports the following hooks:

  • useFathom(id, opts)
  • useGoal(code, cents)

Setup

npm install remix-fathom fathom-client

fathom-client is a peer dependency.

Then in app/root.tsx, add

import { useFathom } from "remix-fathom";

useFathom("YOUR_SITE_ID", myOpts);

useFathom

Supply your Fathom site ID and optional opts object to configure fathom-client. While fathom-client is a peer dependency, the useFathom hook will set up loading and registering your tracked views each time the page changes.

useGoal

This hook returns you a memoized function pre-populated with your provided code and cents.


Thanks to Sergio Xalambrí for the inspiration!

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago