Added some metrics to monitor in Google Analytics

This commit is contained in:
Przemek Wiech
2019-03-17 23:36:53 +01:00
parent b594ea5315
commit 1a1f49f2e6
4 changed files with 46 additions and 5 deletions

4
src/analytics.ts Normal file
View File

@@ -0,0 +1,4 @@
/** Sends an event to Google Analytics. */
export function analyticsEvent(action: string, data?: any) {
(window as any).gtag('event', action, data);
}