-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4e5be7
commit 16f0476
Showing
3 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
enum EventType { | ||
'link', | ||
'navigate', | ||
'recommend', | ||
} | ||
const EVENT_TYPE = ['link', 'navigate', 'recommend'] as const; | ||
type EventType = (typeof EVENT_TYPE)[number]; | ||
|
||
type TrackEvent = ( | ||
event_value: string, | ||
event_type?: { [key: string]: string | number } & { | ||
type: keyof typeof EventType; | ||
}, | ||
url?: string | undefined, | ||
website_id?: string | undefined | ||
event_name: string, | ||
event_data?: { type?: EventType } & { [key: string]: string | number } | ||
) => void; | ||
|
||
export const trackEvent: TrackEvent = (...args) => { | ||
if (window.umami && typeof window.umami.trackEvent === 'function') { | ||
window.umami.trackEvent(...args); | ||
if (window.umami && typeof window.umami.track === 'function') { | ||
window.umami.track(...args); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16f0476
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
theodorusclarence – ./
theodorusclarence-theodorusclarence.vercel.app
theodorusclarence.com
theodorusclarence-git-main-theodorusclarence.vercel.app
www.theodorusclarence.com
dev.theodorusclarence.com