first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
20
apps/web/modules/analytics/provider/vercel/index.tsx
Normal file
20
apps/web/modules/analytics/provider/vercel/index.tsx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
"use client";
|
||||
|
||||
// @ts-expect-error package is not installed per default
|
||||
import { track } from "@vercel/analytics";
|
||||
// @ts-expect-error package is not installed per default
|
||||
import { Analytics } from "@vercel/analytics/react";
|
||||
|
||||
export function AnalyticsScript() {
|
||||
return <Analytics />;
|
||||
}
|
||||
|
||||
export function useAnalytics() {
|
||||
const trackEvent = (event: string, data?: Record<string, unknown>) => {
|
||||
track(event, data);
|
||||
};
|
||||
|
||||
return {
|
||||
trackEvent,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue