Skip to content

Commit

Permalink
Add tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
krishaamer committed Apr 24, 2024
1 parent 0557952 commit 7a8610a
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 0 deletions.
22 changes: 22 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,21 @@ import { Analytics } from "@vercel/analytics/react";
import { Toaster } from "@/components/ui/toaster";
import { AI } from "./action";
import { Providers } from "@/components/providers";
import Hotjar from "@hotjar/browser";
import { init as initFullStory, FullStory } from "@fullstory/browser";
import { GoogleAnalytics } from "nextjs-google-analytics";
import "./globals.css";


const siteId = 4956812;
const hotjarVersion = 6;

Hotjar.init(siteId, hotjarVersion);
Hotjar.init(siteId, hotjarVersion, {
debug: true,
});
initFullStory({ orgId: "o-1XVGW4-na1" });

const meta = {
title: "綠濾",
description: "See your money through the lens of sustainability",
Expand Down Expand Up @@ -58,8 +71,17 @@ export default function RootLayout({
}: Readonly<{
children: React.ReactNode;
}>) {

FullStory("trackEvent", {
name: "Ziran Init",
properties: {
myprop: "somedata",
},
});

return (
<html lang="en" suppressHydrationWarning>
<GoogleAnalytics trackPageViews />
<body
className={`font-sans antialiased ${GeistSans.variable} ${GeistMono.variable}`}
>
Expand Down
35 changes: 35 additions & 0 deletions components/llm-distance/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use client";

import { APIProvider, Map, Marker } from "@vis.gl/react-google-maps";

export default function SimpleMap() {
const position = { lat: 23.0124433, lng: 120.212851 };
const marker1 = { lat: 23.0124433, lng: 120.212851 };
const marker2 = { lat: 23.018500, lng: 120.212751 };
const marker3 = { lat: 23.0124222, lng: 120.218951 };

return (
<div
style={{ height: "500px", width: "100%" }}
className="rounded-lg shadow-lg ring overflow-hidden"
>
<APIProvider
apiKey={
process.env.REACT_APP_GOOGLE_MAPS_API_KEY ||
"AIzaSyB6uP_GJFF4Ngfxdp3aftquS7cYp_tgw18"
}
>
<Map
defaultCenter={position}
defaultZoom={13}
gestureHandling={"greedy"}
disableDefaultUI={true}
>
<Marker position={marker1} />
<Marker position={marker2} />
<Marker position={marker3} />
</Map>
</APIProvider>
</div>
);
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx}\" --cache"
},
"dependencies": {
"@fullstory/browser": "^2.0.4",
"@hotjar/browser": "^1.0.9",
"@pinecone-database/pinecone": "^2.2.0",
"@polygon.io/client-js": "^7.3.2",
"@radix-ui/colors": "^3.0.0",
Expand Down Expand Up @@ -44,6 +46,7 @@
"next": "14.2.2",
"next-auth": "5.0.0-beta.16",
"next-themes": "^0.3.0",
"nextjs-google-analytics": "^2.3.3",
"openai": "^4.38.3",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
Expand Down
39 changes: 39 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 7a8610a

Please sign in to comment.