1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-05-28 08:41:30 +00:00
8bitworkshop/src/ide/analytics.ts

15 lines
317 B
TypeScript
Raw Normal View History

2023-12-04 16:18:13 +00:00
declare var ga;
export function gaEvent(category: string, action: string, label?: string, value?: string) {
if (window['ga']) {
ga('send', 'event', category, action, label, value);
}
}
export function gaPageView(page: string) {
if (window['ga']) {
ga('send', 'pageview', page);
}
}