🐛 (googleAnalytics) Fix sendTo initial value in settings
This commit is contained in:
@@ -38,7 +38,7 @@ export const sendGaEvent = (options: GoogleAnalyticsOptions) => {
|
||||
gtag('event', options.action, {
|
||||
event_category: options.category,
|
||||
event_label: options.label,
|
||||
value: options.value,
|
||||
value: options.value as number,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ export const sendGaEvent = (options: GoogleAnalyticsOptions) => {
|
||||
gtag('event', options.action, {
|
||||
event_category: options.category,
|
||||
event_label: options.label,
|
||||
value: options.value,
|
||||
value: options.value as number,
|
||||
send_to: options.sendTo,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import { z } from 'zod'
|
||||
import { blockBaseSchema } from '../baseSchemas'
|
||||
import { IntegrationBlockType } from './enums'
|
||||
import { variableStringSchema } from '../../utils'
|
||||
|
||||
export const googleAnalyticsOptionsSchema = z.object({
|
||||
trackingId: z.string().optional(),
|
||||
category: z.string().optional(),
|
||||
action: z.string().optional(),
|
||||
label: z.string().optional(),
|
||||
value: z.number().optional(),
|
||||
value: z.number().or(variableStringSchema).optional(),
|
||||
sendTo: z.string().optional(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user