mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-17 01:30:31 +03:00
app, pkg: adding matomo
This commit is contained in:
parent
798d4f16fa
commit
7c4aa63721
15
package-lock.json
generated
15
package-lock.json
generated
@ -9,6 +9,7 @@
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@socialgouv/matomo-next": "^1.4.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||
"@tlon/sigil-js": "^1.4.5",
|
||||
"@urbit/foundation-design-system": "^0.5.3",
|
||||
@ -286,6 +287,14 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@socialgouv/matomo-next": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@socialgouv/matomo-next/-/matomo-next-1.4.0.tgz",
|
||||
"integrity": "sha512-S+kNX7dwo/cL0VE7GWY8Gnf3t7aeXD4CzallRz9IEttjHJDJI2S8xOrcyaGimYpInr3nDNo+WqeYrafKUdsn1g==",
|
||||
"peerDependencies": {
|
||||
"next": ">= 9.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@swc/helpers": {
|
||||
"version": "0.4.3",
|
||||
"license": "MIT",
|
||||
@ -2536,6 +2545,12 @@
|
||||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@socialgouv/matomo-next": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@socialgouv/matomo-next/-/matomo-next-1.4.0.tgz",
|
||||
"integrity": "sha512-S+kNX7dwo/cL0VE7GWY8Gnf3t7aeXD4CzallRz9IEttjHJDJI2S8xOrcyaGimYpInr3nDNo+WqeYrafKUdsn1g==",
|
||||
"requires": {}
|
||||
},
|
||||
"@swc/helpers": {
|
||||
"version": "0.4.3",
|
||||
"requires": {
|
||||
|
@ -16,6 +16,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@iarna/toml": "^2.2.5",
|
||||
"@socialgouv/matomo-next": "^1.4.0",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.0",
|
||||
"@tlon/sigil-js": "^1.4.5",
|
||||
"@urbit/foundation-design-system": "^0.5.3",
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { configure, GlobalHotKeys } from "react-hotkeys";
|
||||
import { init } from "@socialgouv/matomo-next";
|
||||
import Search from "../components/Search";
|
||||
import Head from "next/head";
|
||||
|
||||
@ -8,8 +9,21 @@ import "@urbit/foundation-design-system/styles/markdown.css";
|
||||
import "@urbit/foundation-design-system/styles/prism.css";
|
||||
import "../styles/developers.css";
|
||||
|
||||
const MATOMO_URL = process?.env?.NEXT_PUBLIC_MATOMO_URL || "";
|
||||
const MATOMO_SITE_ID = process?.env?.NEXT_PUBLIC_MATOMO_SITE_ID || "";
|
||||
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
const [showSearch, setSearch] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
init({
|
||||
url: MATOMO_URL,
|
||||
siteId: MATOMO_SITE_ID,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const closeSearch = (event) => {
|
||||
if (event?.preventDefault) {
|
||||
event.preventDefault();
|
||||
@ -45,7 +59,7 @@ function MyApp({ Component, pageProps }) {
|
||||
configure({
|
||||
// ignoreTags: [],
|
||||
ignoreTags: ["input", "select", "textarea"],
|
||||
ignoreEventsCondition: function () {},
|
||||
ignoreEventsCondition: function () { },
|
||||
});
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user