Skip to content

Commit

Permalink
feat: penkle analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
herbievine authored Feb 29, 2024
2 parents ec0fc8d + e3a7a57 commit b5272ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { PenkleAnalytics } from "@/components/analytics";
import "@/styles/globals.css";
import { Analytics } from "@vercel/analytics/react";
import { SpeedInsights } from "@vercel/speed-insights/next";
Expand Down Expand Up @@ -85,6 +86,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
<div className="w-full">{children}</div>
</div>
<Analytics />
<PenkleAnalytics domain="reactive.so" />
<SpeedInsights />
</body>
</html>
Expand Down
13 changes: 13 additions & 0 deletions src/components/analytics.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client";

import Script from "next/script";

const SCRIPT = "https://penkle.com/scripts/penkle.min.js";

type Props = {
domain: string;
};

export function PenkleAnalytics({ domain }: Props) {
return <Script async defer data-domain={domain} src={SCRIPT} />;
}

0 comments on commit b5272ea

Please sign in to comment.