From 69aa6c8337036514ee90a7768ef653a4bc275fc8 Mon Sep 17 00:00:00 2001 From: Dmitry Semenov Date: Tue, 24 Oct 2023 04:08:41 +0300 Subject: [PATCH] Migrate to beampipe.io analytics --- src/components/Analytics.astro | 6 ++++++ src/components/Footer.astro | 2 +- src/components/GoogleAnalytics.astro | 20 -------------------- src/layouts/Layout.astro | 5 ++--- src/pages/index.astro | 2 +- src/{config.ts => site_config.ts} | 2 -- 6 files changed, 10 insertions(+), 27 deletions(-) create mode 100644 src/components/Analytics.astro delete mode 100644 src/components/GoogleAnalytics.astro rename src/{config.ts => site_config.ts} (80%) diff --git a/src/components/Analytics.astro b/src/components/Analytics.astro new file mode 100644 index 0000000..f5f5910 --- /dev/null +++ b/src/components/Analytics.astro @@ -0,0 +1,6 @@ + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index bcd4914..24bfae9 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,6 +1,6 @@ --- import { Icon } from "astro-icon/components"; -import { FOOTER_FULLNAME } from "../config"; +import { FOOTER_FULLNAME } from "../site_config"; const today = new Date(); --- diff --git a/src/components/GoogleAnalytics.astro b/src/components/GoogleAnalytics.astro deleted file mode 100644 index e875bcb..0000000 --- a/src/components/GoogleAnalytics.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -export interface Props { - id: string; - partytown?: boolean; -} - -const { id, partytown = false } = Astro.props; -const attrs = partytown ? { type: "text/partytown" } : {}; ---- - - - diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 1ec649a..3c35809 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,6 @@ --- import { SEO } from "astro-seo"; -import GoogleAnalytics from "../components/GoogleAnalytics.astro"; +import Analytics from "../components/Analytics.astro"; import Header from "../components/header/Header.astro"; import Footer from "../components/Footer.astro"; import "normalize.css"; @@ -9,7 +9,6 @@ import "@fontsource/montserrat/400.css"; import "@fontsource/montserrat/600.css"; import "../styles/variables.css"; import "../styles/input.scss"; -import { GOOGLE_ANALYTICS_ID } from "../config"; export interface Props { title: string; @@ -43,7 +42,7 @@ const IS_PRODUCTION = import.meta.env.PROD; }, }} /> - {IS_PRODUCTION && } + {IS_PRODUCTION && }
diff --git a/src/pages/index.astro b/src/pages/index.astro index 8f48410..b88a578 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import { SITE_TITLE, SITE_DESCRIPTION } from "../config"; +import { SITE_TITLE, SITE_DESCRIPTION } from "../site_config"; import Layout from "../layouts/Layout.astro"; import Skills from "../sections/Skills.astro"; import Projects from "../sections/Projects.astro"; diff --git a/src/config.ts b/src/site_config.ts similarity index 80% rename from src/config.ts rename to src/site_config.ts index 0210cec..bef60c8 100644 --- a/src/config.ts +++ b/src/site_config.ts @@ -3,5 +3,3 @@ export const SITE_DESCRIPTION = "Personal Website"; export const HEADER_USERNAME = "lonelyteapot"; export const FOOTER_FULLNAME = "Dmitry Semenov"; - -export const GOOGLE_ANALYTICS_ID = "G-4N4MCBCG3C";