diff --git a/app/components/Layout/Analytics.jsx b/app/components/Layout/Analytics.jsx deleted file mode 100644 index 044ace569..000000000 --- a/app/components/Layout/Analytics.jsx +++ /dev/null @@ -1,36 +0,0 @@ -import React from "react"; - -const SNOWPLOW_TRACKER = ` -// -;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; - p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) - };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; - n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","https://www2.gov.bc.ca/StaticWebResources/static/sp/sp-2-14-0.js","snowplow")); -var collector = 'spt.apps.gov.bc.ca'; - window.snowplow('newTracker','rt',collector, { - appId: "Snowplow_standalone", - cookieLifetime: 86400 * 548, - platform: 'web', - post: true, - forceSecureTracker: true, - contexts: { - webPage: true, - performanceTiming: true - } - }); - window.snowplow('enableActivityTracking', 30, 30); // Ping every 30 seconds after 30 seconds - window.snowplow('enableLinkClickTracking'); - window.snowplow('trackPageView'); -// -`; - -export default () => { - return ( - - ); -}; diff --git a/app/next.config.js b/app/next.config.js index 8c74f23b4..19dc5e5c6 100644 --- a/app/next.config.js +++ b/app/next.config.js @@ -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, diff --git a/app/pages/_document.tsx b/app/pages/_document.tsx index ccc449fb4..695709afb 100644 --- a/app/pages/_document.tsx +++ b/app/pages/_document.tsx @@ -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() { @@ -42,7 +38,6 @@ class MyDocument extends Document {