mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
16 lines
285 B
TypeScript
16 lines
285 B
TypeScript
|
export const sendEvent = (
|
||
|
action: string,
|
||
|
label: string,
|
||
|
value?: any,
|
||
|
category?: string
|
||
|
): void => {
|
||
|
const gtag = (window as any).gtag
|
||
|
if (gtag) {
|
||
|
gtag('event', action, {
|
||
|
event_label: label,
|
||
|
event_value: value,
|
||
|
event_category: category,
|
||
|
})
|
||
|
}
|
||
|
}
|