diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 1ac8e2a..b879429 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -2,7 +2,7 @@ import "../style/fonts.css"; import "../style/global.css"; -import { SITE_TITLE, SITE_DESCRIPTION } from "../config"; +import { SITE_TITLE } from "../config"; const { title, description, image = "/home-blog-card.png" } = Astro.props; --- @@ -64,7 +64,7 @@ const { title, description, image = "/home-blog-card.png" } = Astro.props; s = d.getElementsByTagName("script")[0]; g.async = true; g.src = u + "matomo.js"; - s.parentNode.insertBefore(g, s); + s.parentNode?.insertBefore(g, s); })(); diff --git a/src/env.d.ts b/src/env.d.ts index 8c34fb4..29dc863 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,7 @@ -/// \ No newline at end of file +/// + +type MatomoCommand = [command: string, ...args: (string | number | boolean)[]]; + +interface Window { + _paq?: MatomoCommand[]; +}