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
2 changes: 2 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Footer } from "@/components/layout/footer";
import { CartDrawer } from "@/components/cart/cart-drawer";
import { ToastProvider } from "@/components/ui/toast-provider";
import { WebVitals } from "@/_components/web-vitals";
import { InteractionTracker } from "@/components/interaction-tracker";

const inter = Inter({ subsets: ["latin"] });

Expand Down Expand Up @@ -36,6 +37,7 @@ export default function RootLayout({
</div>
<CartDrawer />
<ToastProvider />
<InteractionTracker />
{process.env.NODE_ENV === "production" ? null : <WebVitals />}
</body>
</html>
Expand Down
23 changes: 23 additions & 0 deletions components/interaction-tracker.tsx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove all comments and remove the project id as we will not use it in the future

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";

import { useEffect } from "react";
import { createCrowSDK } from "@b3-crow/website-hook-sdk";

export function InteractionTracker() {
useEffect(() => {
// Create and initialize the SDK (only runs in browser)
const crow = createCrowSDK({
projectId: "pk_test_abc123def456",
debug: true, // Enable detailed logging
});

crow.initializeSdk();

// Cleanup on unmount
return () => {
crow.destroySdk();
};
}, []);

return null;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"lighthouse:performance": "pnpm exec lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
},
"dependencies": {
"@b3-crow/website-hook-sdk": "0.0.19",
"@b3-crow/website-hook-sdk": "0.0.23",
"@opennextjs/cloudflare": "^1.14.7",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-separator": "^1.1.8",
Expand Down
70 changes: 9 additions & 61 deletions pnpm-lock.yaml

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