Skip to content

Commit

Permalink
integrate openpanel
Browse files Browse the repository at this point in the history
  • Loading branch information
sajadevo committed Jan 3, 2025
1 parent 64d2c4e commit 8e66ec0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ NEXT_PUBLIC_DEV_URL=https://localhost:3000

RESEND_API_KEY=
RESEND_FROM_EMAIL=
RESEND_TO_EMAIL=
RESEND_TO_EMAIL=

OPENPANEL_CLIENT_ID=
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ NEXT_PUBLIC_DEV_URL=https://localhost:3000
RESEND_API_KEY=
RESEND_FROM_EMAIL=
RESEND_TO_EMAIL=

OPENPANEL_CLIENT_ID=
```

## Notes
Expand Down
7 changes: 7 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @components
import { Footer, FrameLines } from "@/components";
import { OpenPanelComponent } from "@openpanel/nextjs";

// @utils
import { generateMetadata } from "@/lib/utils";
Expand All @@ -25,6 +26,12 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<OpenPanelComponent
clientId={process.env.OPENPANEL_CLIENT_ID!}
trackScreenViews={true}
trackAttributes={true}
trackOutgoingLinks={true}
/>
<body
className={`${geistSans.variable} antialiased p-6 sm:p-10 lg:p-20 bg-background relative overflow-x-hidden`}
>
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"dependencies": {
"@hookform/resolvers": "3.9.1",
"@openpanel/nextjs": "^1.0.7",
"@radix-ui/react-tooltip": "1.1.6",
"@tailwindcss/postcss": "next",
"clsx": "2.1.1",
Expand Down

0 comments on commit 8e66ec0

Please sign in to comment.