1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-23 11:26:09 -05:00

re-enable vercel analytics

This commit is contained in:
2025-04-13 12:41:49 -04:00
parent 259e23ce8a
commit 794d315c6a
11 changed files with 55 additions and 105 deletions

View File

@@ -1,24 +0,0 @@
import { env } from "../lib/env";
import Script from "next/script";
const Analytics = () => {
if (env.VERCEL_ENV !== "production") {
return null;
}
if (!env.NEXT_PUBLIC_UMAMI_WEBSITE_ID) {
return null;
}
return (
<Script
src="/_stream/u/script.js" // see next.config.ts rewrite
id="umami-js"
strategy="afterInteractive"
data-website-id={env.NEXT_PUBLIC_UMAMI_WEBSITE_ID}
data-domains={env.VERCEL_PROJECT_PRODUCTION_URL}
/>
);
};
export default Analytics;

View File

@@ -1,6 +1,6 @@
import { JsonLd } from "react-schemaorg";
import { Analytics } from "@vercel/analytics/next";
import clsx from "clsx";
import Analytics from "./analytics";
import { ThemeProvider, ThemeScript } from "../contexts/ThemeContext";
import Header from "../components/Header";
import Footer from "../components/Footer";

View File

@@ -26,7 +26,7 @@ A very simple hit counter on each blog post tallies an aggregate number of pagev
The [server component](https://github.com/jakejarvis/jarv.is/blob/main/app/notes/%5Bslug%5D/counter.tsx) and [API endpoint](https://github.com/jakejarvis/jarv.is/blob/main/app/api/hits/route.ts) are open source, and [snapshots of the database](https://github.com/jakejarvis/website-stats) are public.
A self-hosted [**Umami**](https://umami.is/) instance is also used to gain insights into referrers, search terms, etc. [without collecting anything identifiable](https://umami.is/blog/why-privacy-matters) about you. [The dashboard is even public, too!](https://umami-wine-eight.vercel.app/share/wwTaTpLgC6gP9VyX/jarv.is)
[**Vercel Analytics**](https://vercel.com/docs/analytics) is also used to gain insights into referrers, search terms, etc. [without collecting anything identifiable](https://vercel.com/docs/analytics/privacy-policy) about you.
## Third-Party Content

View File

@@ -5,7 +5,7 @@ const robots = (): MetadataRoute.Robots => ({
rules: [
{
userAgent: "*",
disallow: ["/_stream/", "/api/", "/404", "/500"],
disallow: ["/api/", "/404", "/500"],
},
],
sitemap: `${BASE_URL}/sitemap.xml`,