From 59abe6f83e89ade4139ce6fdd9d46bef478e3df9 Mon Sep 17 00:00:00 2001 From: Pierre Bastianelli Date: Wed, 12 Jun 2024 13:56:55 -0700 Subject: [PATCH 1/3] chore: remove snowplow analytics --- app/components/Layout/Analytics.jsx | 36 ---------------------- app/next.config.js | 1 - app/pages/_document.tsx | 5 --- app/server/index.js | 4 --- helm/cas-ciip-portal/templates/deploy.yaml | 2 -- helm/cas-ciip-portal/values-prod.yaml | 3 -- helm/cas-ciip-portal/values-test.yaml | 2 -- helm/cas-ciip-portal/values.yaml | 3 -- 8 files changed, 56 deletions(-) delete mode 100644 app/components/Layout/Analytics.jsx diff --git a/app/components/Layout/Analytics.jsx b/app/components/Layout/Analytics.jsx deleted file mode 100644 index 044ace5697..0000000000 --- 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 ( -