first
This commit is contained in:
commit
8538ab969a
434 changed files with 44051 additions and 0 deletions
17
apps/web/modules/analytics/provider/google/index.tsx
Normal file
17
apps/web/modules/analytics/provider/google/index.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"use client";
|
||||
|
||||
import { GoogleAnalytics, sendGAEvent } from "@next/third-parties/google";
|
||||
|
||||
const googleTagId = process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS_ID as string;
|
||||
|
||||
export function AnalyticsScript() {
|
||||
return <GoogleAnalytics gaId={googleTagId} />;
|
||||
}
|
||||
|
||||
export function useAnalytics() {
|
||||
const trackEvent = sendGAEvent;
|
||||
|
||||
return {
|
||||
trackEvent,
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue