From f3ed0d5108fc219b9f7077e1377cc1b39c56bae3 Mon Sep 17 00:00:00 2001 From: Nuno Polonia Date: Mon, 29 Jan 2024 11:57:06 +0000 Subject: [PATCH 1/2] feat: remove plausible and custom event tracking --- src/components/blocks/hero.svelte | 2 - src/components/blocks/rich-text-box.svelte | 17 +------ src/components/blocks/testimonials.svelte | 20 +-------- src/components/blog-entry.svelte | 27 +---------- src/components/contact-form.svelte | 10 +---- src/components/draw-your-segg/canvas.svelte | 9 ---- src/components/page-drawer.svelte | 8 ---- src/components/pages/about/timeline.svelte | 20 +-------- src/components/pages/blog-index.svelte | 2 - src/components/pages/blog-post.svelte | 38 ++-------------- src/components/pages/careers.svelte | 21 ++------- .../careers/canvas-items/checklist.svelte | 2 - .../careers/canvas-items/cycle-images.svelte | 5 +-- .../careers/canvas-items/egg-hatching.svelte | 2 - .../pages/careers/canvas-items/egg.svelte | 2 - .../pages/careers/canvas-items/plant.svelte | 2 - .../pages/careers/canvas-items/tarot.svelte | 8 ---- .../careers/canvas-items/tictactoe.svelte | 2 - src/components/pages/careers/canvas.svelte | 4 +- src/components/pages/home-page.svelte | 34 ++------------ src/components/pages/home/home-about.svelte | 30 ++----------- src/components/pages/home/services.svelte | 14 +----- .../pages/home/small-highlights.svelte | 6 --- src/components/pages/project.svelte | 14 +----- src/components/pages/projects-index.svelte | 6 --- src/components/pages/services.svelte | 9 ---- src/components/pages/team-member.svelte | 13 ------ src/components/project-entry.svelte | 43 ++---------------- src/components/reel.svelte | 8 +--- src/components/top-navigation.svelte | 13 +----- src/lib/track.ts | 45 ------------------- src/routes/(marketing-site)/+error.svelte | 6 --- src/routes/(marketing-site)/+layout.svelte | 16 +------ vercel.json | 22 --------- 34 files changed, 33 insertions(+), 447 deletions(-) delete mode 100644 src/lib/track.ts diff --git a/src/components/blocks/hero.svelte b/src/components/blocks/hero.svelte index a0566781..e9cddbb1 100644 --- a/src/components/blocks/hero.svelte +++ b/src/components/blocks/hero.svelte @@ -6,7 +6,6 @@ import Slogan from '$components/slogan.svelte'; import { drawerLinks } from '$lib/actions/drawer-links'; import { VIDEO_EXTENSIONS } from '$lib/constants'; - import { TrackingEvent } from '$lib/track'; import { getImageAttributes } from '$lib/utils/cms'; import { getFileExtension } from '$lib/utils/strings'; @@ -51,7 +50,6 @@ ? getImageAttributes(block.showreel_cover).src : undefined} buttonTheme={block.showreel_button_theme} - trackEvent={{ event: TrackingEvent.HOME_REEL }} /> {/if} diff --git a/src/components/blocks/rich-text-box.svelte b/src/components/blocks/rich-text-box.svelte index ebeaa729..e32cb6dd 100644 --- a/src/components/blocks/rich-text-box.svelte +++ b/src/components/blocks/rich-text-box.svelte @@ -1,7 +1,5 @@
@@ -217,7 +212,6 @@ toast.success({ message: t('draw-segg.clipboard.feedback') }); - track(TrackingEvent.DRAW_YOUR_SEGG_COPY); }} > copy link @@ -227,9 +221,6 @@ { - track(TrackingEvent.DRAW_YOUR_SEGG_DOWNLOAD); - }} href={canvas?.toDataURL('image/png')}>download {/key} diff --git a/src/components/page-drawer.svelte b/src/components/page-drawer.svelte index ac7c9854..63d83369 100644 --- a/src/components/page-drawer.svelte +++ b/src/components/page-drawer.svelte @@ -9,7 +9,6 @@ import { page } from '$app/stores'; import { fetchPage } from '$lib/content'; import { setContext } from 'svelte'; - import { TrackingEvent, track } from '$lib/track'; let expanding = false; @@ -42,13 +41,6 @@ variant="ghost" icon="expand" on:click={() => { - if ($drawer) { - track(TrackingEvent.DRAWER_EXPAND, { - props: { - to: $drawer - } - }); - } expanding = true; }}>{t('expand')} diff --git a/src/components/pages/about/timeline.svelte b/src/components/pages/about/timeline.svelte index 7a92447d..2ddb9269 100644 --- a/src/components/pages/about/timeline.svelte +++ b/src/components/pages/about/timeline.svelte @@ -1,8 +1,6 @@ diff --git a/src/components/pages/careers/canvas-items/cycle-images.svelte b/src/components/pages/careers/canvas-items/cycle-images.svelte index b2d10e78..07131161 100644 --- a/src/components/pages/careers/canvas-items/cycle-images.svelte +++ b/src/components/pages/careers/canvas-items/cycle-images.svelte @@ -1,5 +1,4 @@ @@ -37,12 +35,6 @@ style="left: {item.left || 0}px; top: {item.top || 0}px; transform: rotate({item.rotate || 0}deg); perspective: 1000px" class="h-[300px] w-[200px]" - on:click={() => { - if (!hasInteracted) { - track(TrackingEvent.CAREERS_CANVAS_FLIPPED_TAROT); - hasInteracted = true; - } - }} >
tile === -9).length === 0 && gameState === 'in-progress') diff --git a/src/components/pages/careers/canvas.svelte b/src/components/pages/careers/canvas.svelte index e100a449..58e6305b 100644 --- a/src/components/pages/careers/canvas.svelte +++ b/src/components/pages/careers/canvas.svelte @@ -16,7 +16,6 @@ import Plant from './canvas-items/plant.svelte'; import Egg from './canvas-items/egg.svelte'; import EggHatching from './canvas-items/egg-hatching.svelte'; - import { TrackingEvent, track } from '$lib/track'; const MINIMAP_W = 128; const MINIMAP_PADDING = 8; @@ -79,8 +78,7 @@ bind:this={container} use:dragScrolling={{ isActive: withMouseDragScroll, - centerYOffset: -240, - onInteraction: () => track(TrackingEvent.CAREERS_INTERACT_WITH_CANVAS) + centerYOffset: -240 }} use:scrollPosition={(left, top) => { boxLeft = left; diff --git a/src/components/pages/home-page.svelte b/src/components/pages/home-page.svelte index 855583f0..6f9b1f72 100644 --- a/src/components/pages/home-page.svelte +++ b/src/components/pages/home-page.svelte @@ -16,7 +16,6 @@ import { afterNavigate } from '$app/navigation'; import { getAnchorFromCmsLink, getImageAttributes } from '$lib/utils/cms'; import Services from './home/services.svelte'; - import { TrackingEvent, track } from '$lib/track'; import { drawerLinks } from '$lib/actions/drawer-links'; import { t } from '$lib/i18n'; import Testimonials from '$components/blocks/testimonials.svelte'; @@ -62,7 +61,6 @@ ? getImageAttributes(data.showreel_cover).src : undefined} buttonTheme={data.showreel_button_theme} - trackEvent={{ event: TrackingEvent.HOME_REEL }} /> {/if}
@@ -125,11 +123,6 @@ { - track(TrackingEvent.CAREER_CLICK, { - props: { name: career.name, to: career.full_slug, path: $page.url.pathname } - }); - }} > {career.name}
- {data.careers_button_label}