Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/web/.env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ API_BASE_URL=http://localhost:3100
# Debug
# NEXT_PUBLIC_DEBUG=true

# Google Analytics 4 (optional — Rakuten affiliate traffic reporting)
# NEXT_PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX

# Sentry (error tracking)
# NEXT_PUBLIC_SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
# SENTRY_DSN=https://xxx@xxx.ingest.sentry.io/xxx
Expand Down
2 changes: 2 additions & 0 deletions packages/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ThemeScript } from "@/lib/theme/theme-script";
import { EventFlushProvider } from "./EventFlushProvider";
import { JsonLdOrganization } from "@/lib/seo/json-ld";
import { SessionExpiredBanner } from "@/lib/components/auth/SessionExpiredBanner";
import { DecodedGoogleAnalytics } from "@/lib/analytics/google-analytics";

const playfairDisplay = Playfair_Display({
subsets: ["latin"],
Expand Down Expand Up @@ -101,6 +102,7 @@ export default function RootLayout({
{/* <LazyOnboardingSheet /> */}
<LazyVtonModal />
</AppProviders>
<DecodedGoogleAnalytics />
</body>
</html>
);
Expand Down
8 changes: 8 additions & 0 deletions packages/web/lib/analytics/google-analytics.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { GoogleAnalytics } from "@next/third-parties/google";

export function DecodedGoogleAnalytics() {
const gaId = process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID;
if (!gaId) return null;

return <GoogleAnalytics gaId={gaId} />;
}
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@chenglou/pretext": "^0.0.4",
"@decoded/shared": "workspace:*",
"@gsap/react": "^2.1.2",
"@next/third-parties": "^16.2.1",
"@radix-ui/react-slot": "^1.2.4",
"@sentry/nextjs": "^10.47.0",
"@splinetool/react-spline": "^4.1.0",
Expand Down
Loading