mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-09-27 08:54:48 +00:00
15 lines
317 B
TypeScript
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);
|
|
}
|
|
}
|