Skip to content

Commit

Permalink
chore: remove snowplow analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
pbastia committed Jun 12, 2024
1 parent 9b35a02 commit 59abe6f
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 56 deletions.
36 changes: 0 additions & 36 deletions app/components/Layout/Analytics.jsx

This file was deleted.

1 change: 0 additions & 1 deletion app/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = withSentryConfig(
publicRuntimeConfig: {
ADMIN_EMAIL: process.env.ADMIN_EMAIL,
SUPPORT_EMAIL: process.env.SUPPORT_EMAIL,
ENABLE_ANALYTICS: process.env.ENABLE_ANALYTICS,
SITEWIDE_NOTICE: process.env.SITEWIDE_NOTICE,
ENABLE_DB_MOCKS: process.env.ENABLE_DB_MOCKS,
SENTRY_ENVIRONMENT: process.env.SENTRY_ENVIRONMENT,
Expand Down
5 changes: 0 additions & 5 deletions app/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import React from "react";
import Document, { Html, Head, Main, NextScript } from "next/document";
import Analytics from "components/Layout/Analytics";
import getConfig from "next/config";

const CONFIG = getConfig()?.publicRuntimeConfig;

class MyDocument extends Document {
render() {
Expand Down Expand Up @@ -42,7 +38,6 @@ class MyDocument extends Document {
<body>
<Main />
<NextScript />
{CONFIG?.ENABLE_ANALYTICS === "true" && <Analytics />}
</body>
</Html>
);
Expand Down
4 changes: 0 additions & 4 deletions app/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const dev = process.env.NODE_ENV !== "production";
const app = nextjs({ dev });
const handle = app.getRequestHandler();
const bodyParser = require("body-parser");
const cors = require("cors");
const UNSUPPORTED_BROWSERS = require("../data/unsupported-browsers");
const { run } = require("graphile-worker");
const path = require("path");
Expand Down Expand Up @@ -88,9 +87,6 @@ app.prepare().then(async () => {

server.use(bodyParser.json({ limit: "50mb" }));

// Only allow CORS for the <Analytics /> component
server.use(cors({ origin: "https://www2.gov.bc.ca" }));

// Tell search + crawlers not to index non-production environments:
server.use(({ res, next }) => {
if (!process.env.NAMESPACE || !process.env.NAMESPACE.endsWith("-prod")) {
Expand Down
2 changes: 0 additions & 2 deletions helm/cas-ciip-portal/templates/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ spec:
value: {{ .Values.env.adminEmail }}
- name: SUPPORT_EMAIL
value: {{ .Values.env.supportEmail }}
- name: ENABLE_ANALYTICS
value: {{ .Values.analytics.enable | quote }}
- name: SITEWIDE_NOTICE
value: {{ .Values.sitewide_notice.content | quote }}
- name: HOST
Expand Down
3 changes: 0 additions & 3 deletions helm/cas-ciip-portal/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ replicas: 3
route:
host: ciip.gov.bc.ca

analytics:
enable: true

cas-postgres:
patroni:
replicaCount: 4
Expand Down
2 changes: 0 additions & 2 deletions helm/cas-ciip-portal/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ env:
adminEmail: admin@ciip.test
enableDbMocks: true

analytics:
enable: true

dag:
# cleanup the test db before deploying to test
Expand Down
3 changes: 0 additions & 3 deletions helm/cas-ciip-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ env:
sitewide_notice:
content: null

analytics:
enable: false

restoreFromProd:
enable: false

Expand Down

0 comments on commit 59abe6f

Please sign in to comment.