UNPKG

@botonic/plugin-hubtype-analytics

Version:

Plugin for tracking in the Hubtype backend to see the results in the Hubtype Dashbord

16 lines (13 loc) 533 B
import { EventAction, EventCustom, EventType, RequestData } from '../types' import { HtEvent } from './ht-event' export class HtEventCustom extends HtEvent { custom_fields: Record<string, any> custom_sensitive_fields: Record<string, any> constructor(event: EventCustom, requestData: RequestData) { super(event, requestData) this.type = EventType.WebEvent this.action = EventAction.Custom this.custom_fields = event.customFields || {} this.custom_sensitive_fields = event.customSensitiveFields || {} } }