Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove snowplow analytics #2283

Merged
merged 3 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"improved-yarn-audit": "^3.0.0",
"jest": "^27.2.4",
"jest-canvas-mock": "^2.3.1",
"jest-extended": "^0.11.5",
"jest-extended": "^4.0.2",
"jest-mock-random": "^1.1.1",
"jest-raw-loader": "^1.0.1",
"json-schema-faker": "^0.5.0-rc23",
Expand Down Expand Up @@ -179,7 +179,7 @@
"setupFilesAfterEnv": [
"<rootDir>tests/setupTests.ts",
"jest-canvas-mock",
"jest-extended"
"jest-extended/all"
],
"transform": {
".*(ts|tsx|js|jsx)$": "babel-jest",
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
Loading
Loading