From 2ac7caaf245787b57c9a2b4b9a490baad5d29b57 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Tue, 7 Jun 2022 08:37:23 -0700 Subject: [PATCH] Rename /analytics to /stats to work around adblockers (#437) * Rename /analytics to /stats to work around adblockers * Fix prettier lint --- web/next.config.js | 5 +++++ web/pages/embed/analytics.tsx | 2 +- web/pages/{analytics.tsx => stats.tsx} | 0 3 files changed, 6 insertions(+), 1 deletion(-) rename web/pages/{analytics.tsx => stats.tsx} (100%) diff --git a/web/next.config.js b/web/next.config.js index 917d72b3..80d4ac96 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -34,6 +34,11 @@ module.exports = { destination: API_DOCS_URL, permanent: false, }, + { + source: '/analytics', + destination: '/stats', + permanent: true, + }, ] }, } diff --git a/web/pages/embed/analytics.tsx b/web/pages/embed/analytics.tsx index 564c4abc..be850fdf 100644 --- a/web/pages/embed/analytics.tsx +++ b/web/pages/embed/analytics.tsx @@ -5,7 +5,7 @@ import Analytics, { CustomAnalytics, FirebaseAnalytics, getStaticPropz, -} from '../analytics' +} from '../stats' export const getStaticProps = fromPropz(getStaticPropz) diff --git a/web/pages/analytics.tsx b/web/pages/stats.tsx similarity index 100% rename from web/pages/analytics.tsx rename to web/pages/stats.tsx