1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-14 00:29:35 +00:00
8bitworkshop/src/ide/analytics.ts
2023-12-04 11:59:51 -06:00

15 lines
317 B
TypeScript

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);
}
}