Skip to content

Commit

Permalink
chore: add tracking event
Browse files Browse the repository at this point in the history
  • Loading branch information
Falci committed Feb 21, 2024
1 parent 2f63ccd commit c877511
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function App() {
useDebounce(() => setName(value), 350, [value]);

const loadData = async () => {
umami.track('check', { name, token });
setLoading(true);
const { data } = await refetch();
setAddr(data.addr);
Expand Down Expand Up @@ -78,6 +79,13 @@ function App() {
>
Source
</a>
{' | '}
<a
className="hover:text-white"
href="https://hub.docker.com/repository/docker/sinpapeles/hip2-checker"
>
Docker
</a>
</span>
</div>
</>
Expand Down
4 changes: 4 additions & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ declare module 'react-copy-to-clipboard' {
const CopyToClipboard: React.FC<Props>;
export { CopyToClipboard };
}

declare module umami {
export function track(event: string, data: Record<string, string>): void;
}

0 comments on commit c877511

Please sign in to comment.