From 00c62600351c00482708855f5ab5516651f4a674 Mon Sep 17 00:00:00 2001 From: Daniel O'Connell Date: Sat, 18 May 2024 13:13:13 +0200 Subject: [PATCH] Add Matomo tracking --- .github/workflows/deploy-dev.yml | 2 +- .github/workflows/deploy.yml | 2 +- app/root.tsx | 46 ++++++++++++++++---------------- remix.env.d.ts | 2 +- wrangler.toml.template | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 54943c2a..0c9ff155 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -24,7 +24,7 @@ jobs: | sed s/{CODA_TOKEN}/${{ secrets.CODA_TOKEN }}/ \ | sed s/{CODA_INCOMING_TOKEN}/${{ secrets.CODA_INCOMING_TOKEN }}/ \ | sed s/{CODA_WRITES_TOKEN}/${{ secrets.CODA_WRITES_TOKEN }}/ \ - | sed s/{GOOGLE_ANALYTICS_ID}/${{ secrets.GOOGLE_ANALYTICS_ID }}/ \ + | sed s/{MATOMO_DOMAIN}/${{ secrets.MATOMO_DOMAIN }}/ \ > wrangler.toml npm ci npm run deploy diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dfd10a8b..37702d54 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: | sed s/{CODA_TOKEN}/${{ secrets.CODA_TOKEN }}/ \ | sed s/{CODA_INCOMING_TOKEN}/${{ secrets.CODA_INCOMING_TOKEN }}/ \ | sed s/{CODA_WRITES_TOKEN}/${{ secrets.CODA_WRITES_TOKEN }}/ \ - | sed s/{GOOGLE_ANALYTICS_ID}/${{ secrets.GOOGLE_ANALYTICS_ID }}/ \ + | sed s/{MATOMO_DOMAIN}/${{ secrets.MATOMO_DOMAIN }}/ \ > wrangler.toml npm ci npm run deploy diff --git a/app/root.tsx b/app/root.tsx index e44a1d36..a073ff84 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -101,31 +101,31 @@ export const loader = async ({request}: Parameters[0]) => { url: request.url, embed, showSearch, - gaTrackingId: GOOGLE_ANALYTICS_ID, + matomoDomain: MATOMO_DOMAIN, } } -const GoogleAnalytics = ({gaTrackingId}: {gaTrackingId?: string}) => { - if (!gaTrackingId) return null +const AnaliticsTag = ({matomoDomain}: {matomoDomain?: string}) => { + if (!matomoDomain) return null return ( - <> -