File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed
Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import { NuxtLink } from '#components';
3838import { defaultThemeType , themeType } from " ~~/constants/theme.constants" ;
3939import { iconType } from ' ~~/constants/icon.constants' ;
4040import { sizeType } from ' ~~/constants/size.constants' ;
41+ import { trackEvent } from ' ~~/utils/track' ;
4142
4243const response = await $fetch (API_ROUTES .AUTH (' google' ), {
4344 method: ' GET' ,
Original file line number Diff line number Diff line change 2020 </p >
2121 <div class =" result__controls controls" >
2222 <MainButton v-if =" isResultCompleted" :href =" downloadUrl" :label =" downloadButtonText" tag =" a"
23- :size =" sizeType.s" :theme =" themeType.primary" class =" controls__download" />
23+ :size =" sizeType.s" :theme =" themeType.primary" class =" controls__download" @click = " onDownload " />
2424 </div >
2525 <button @click =" openModal()" class =" result__area" />
2626 </template >
3030import { sizeType } from ' ~~/constants/size.constants' ;
3131import { themeType } from ' ~~/constants/theme.constants' ;
3232import { statusType } from " ~~/constants/status.constants" ;
33+ import { trackEvent } from ' ~~/utils/track' ;
3334import { computed , unref } from " vue" ;
3435
3536const { result } = defineProps ({
@@ -68,6 +69,13 @@ const isResultCompleted = computed(() => {
6869const openModal = () => {
6970 emit (' openModal' )
7071}
72+
73+ const onDownload = () => {
74+ trackEvent (' click_download_button' , {
75+ slug: unref (result).slug ,
76+ isMultiSheet: isMultiSheet .value
77+ })
78+ }
7179 </script >
7280<style lang="scss" scoped>
7381.result {
@@ -103,6 +111,7 @@ const openModal = () => {
103111 border : solid 1px var (--error-border );
104112 color : var (--label-primary );
105113 }
114+
106115 & __name {
107116 max-width : 240px ;
108117 word-break : break-all ;
Original file line number Diff line number Diff line change @@ -32,5 +32,5 @@ export default defineEventHandler(async (event) => {
3232 userBalance : userBalance ,
3333 }
3434
35- saveTrackRecordInBackground ( trackRecond )
35+ await saveTrackRecordInBackground ( trackRecond )
3636} )
You can’t perform that action at this time.
0 commit comments