From bde580d099c79489f3dd83b2ed4e723e5c749735 Mon Sep 17 00:00:00 2001 From: Shane Loeffler Date: Mon, 3 Feb 2025 16:13:41 -0600 Subject: [PATCH] switch to plausible --- package-lock.json | 21 +++++++++++++++++++++ package.json | 1 + pages/_app.page.js | 18 +++++++++++++----- pages/_document.page.js | 5 +---- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1059fd86..f58ee965 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,6 +43,7 @@ "ndarray-concat-cols": "^1.0.0", "next": "^14.2.22", "next-mdx-remote": "^4.1.0", + "next-plausible": "^3.12.4", "react": "^18.2.0", "react-animate-height": "^2.0.23", "react-dom": "^18.2.0", @@ -10878,6 +10879,20 @@ "react-dom": ">=16.x <=18.x" } }, + "node_modules/next-plausible": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.4.tgz", + "integrity": "sha512-cD3+ixJxf8yBYvsideTxqli3fvrB7R4BXcvsNJz8Sm2X1QN039WfiXjCyNWkub4h5++rRs6fHhchUMnOuJokcg==", + "license": "MIT", + "funding": { + "url": "https://github.com/4lejandrito/next-plausible?sponsor=1" + }, + "peerDependencies": { + "next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0 ", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -21891,6 +21906,12 @@ "vfile-matter": "^3.0.1" } }, + "next-plausible": { + "version": "3.12.4", + "resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.4.tgz", + "integrity": "sha512-cD3+ixJxf8yBYvsideTxqli3fvrB7R4BXcvsNJz8Sm2X1QN039WfiXjCyNWkub4h5++rRs6fHhchUMnOuJokcg==", + "requires": {} + }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", diff --git a/package.json b/package.json index ba1e0d13..3ba9bd51 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "ndarray-concat-cols": "^1.0.0", "next": "^14.2.22", "next-mdx-remote": "^4.1.0", + "next-plausible": "^3.12.4", "react": "^18.2.0", "react-animate-height": "^2.0.23", "react-dom": "^18.2.0", diff --git a/pages/_app.page.js b/pages/_app.page.js index f085755c..36704d5f 100644 --- a/pages/_app.page.js +++ b/pages/_app.page.js @@ -1,3 +1,5 @@ +import React from 'react' +import PlausibleProvider from 'next-plausible' import { ThemeProvider } from 'theme-ui' import '@carbonplan/components/fonts.css' import '@carbonplan/components/globals.css' @@ -7,11 +9,17 @@ import { ScrollProvider } from '../components/scroll' const App = ({ Component, pageProps }) => { return ( - - - - - + + + + + + + ) } diff --git a/pages/_document.page.js b/pages/_document.page.js index 5f62137a..ab66078f 100644 --- a/pages/_document.page.js +++ b/pages/_document.page.js @@ -1,14 +1,11 @@ import Document, { Html, Main, NextScript, Head } from 'next/document' -import { Tracking } from '@carbonplan/components' import { InitializeColorMode } from 'theme-ui' class MyDocument extends Document { render() { return ( - - - +