update events to fllow naming convention

This commit is contained in:
Jordi Enric committed 2024-11-22 13:44:00 +01:00
1 parent 2a97784e36
commit 81bb997d5a
4 files changed
+11 -8

No files matched your search

@@ -195,8 +195,10 @@ export const CreateCronJobSheet = ({
// We should allow sending custom properties with events
sendEvent({
category: 'cron_jobs',
action: isEditing ? 'update_cron_job' : 'create_cron_job',
label: isEditing ? '_' : '_',
action: isEditing ? 'update_cron_job_clicked' : 'create_cron_job_clicked',
label: isEditing
? 'user clicked update cron job button'
: 'user clicked create cron job button',
properties: {
cron_job_type: values.type,
cron_job_schedule: schedule,
@@ -88,8 +88,8 @@ export const CronJobCard = ({ job, onEditCronJob, onDeleteCronJob }: CronJobCard
onClick={() => {
sendEvent({
category: 'cron_jobs',
action: 'view_previous_runs',
label: 'cron_job_viewed',
action: 'view_previous_runs_clicked',
label: 'user clicked view previous runs button',
})
}}
>
@@ -101,8 +101,8 @@ export const CronJobCard = ({ job, onEditCronJob, onDeleteCronJob }: CronJobCard
onClick={() => {
sendEvent({
category: 'cron_jobs',
action: 'delete_cron_job',
label: 'cron_job_deleted',
action: 'delete_cron_job_clicked',
label: 'user clicked delete cron job button',
})
onDeleteCronJob(job)
}}
@@ -14,6 +14,7 @@ export type SendEventVariables = {
category: string
label: string
value?: string
properties?: Record<string, any>
}
type SendEventPayload = any
@@ -61,8 +61,8 @@ const CronJobsPage: NextPageWithLayout = () => {
onClick={() => {
sendEvent({
category: 'cron_jobs',
action: 'open_create_cron_job_sheet',
label: 'open_create_cron_job_sheet',
action: 'create_cron_job_clicked',
label: 'user clicked create cron job button',
})
setCreateCronJobSheetShown({
jobname: '',