From ab4910c22c576f310cf040c83899a24e4c0212b6 Mon Sep 17 00:00:00 2001 From: Mike Wickett Date: Wed, 21 Apr 2021 22:49:19 -0400 Subject: [PATCH] Trigger fathom story event (#66) * Trigger fathom story event * remove staging from analytics --- pages/_app.tsx | 2 +- pages/thanks.tsx | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pages/_app.tsx b/pages/_app.tsx index 7fc430f..76affaa 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -33,7 +33,7 @@ function MyApp({ Component, pageProps }) { useEffect(() => { Fathom.load('XNKNPYHV', { - includedDomains: ['staging.mycovidstory.ca', 'www.mycovidstory.ca'], + includedDomains: ['www.mycovidstory.ca'], }) function onRouteChangeComplete() { diff --git a/pages/thanks.tsx b/pages/thanks.tsx index 8cecca4..0169e52 100644 --- a/pages/thanks.tsx +++ b/pages/thanks.tsx @@ -1,6 +1,12 @@ +import { useEffect } from 'react' import { Center, Heading, Text, Container, Button, VStack, Icon } from '@chakra-ui/react' export default function Thanks() { + // Triggers a Story goal event on Fathom + useEffect(() => { + window?.fathom?.trackGoal('RT0FH11Y', 0) + }, []) + return (