This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from ellcrys/dev
Analytics, Elld Shell FIx & Onboarding
- Loading branch information
Showing
47 changed files
with
3,339 additions
and
2,177 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { app } from "electron"; | ||
const ua = require("universal-analytics"); | ||
const uuid = require("uuid/v4"); | ||
const { JSONStorage } = require("node-localstorage"); | ||
const nodeStorage = new JSONStorage(app.getPath("userData")); | ||
|
||
// Retrieve the userId value, and if it's not there, assign it a new uuid. | ||
const userId = nodeStorage.getItem("userId") || uuid(); | ||
nodeStorage.setItem("userId", userId); | ||
|
||
const usr = ua("UA-101346362-5", userId); | ||
|
||
export default function trackEvent( | ||
category: string, | ||
action: string, | ||
label?: string, | ||
value?: any, | ||
) { | ||
usr.event({ | ||
ec: category, | ||
ea: action, | ||
el: label, | ||
ev: value, | ||
}).send(); | ||
} | ||
|
||
export function exceptionEvent(desc: string, fatal?: boolean) { | ||
usr.exception(desc, fatal); | ||
} | ||
|
||
export function timingEvent(category: string, variable: string, time: number) { | ||
usr.timing(category, variable, time); | ||
} | ||
|
||
export function trackPage(path: string) { | ||
usr.pageview(path); | ||
} |
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
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
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 |
---|---|---|
|
@@ -27,6 +27,6 @@ Object.defineProperties(Vue.prototype, { | |
}); | ||
export default { | ||
name: 'safehold', | ||
name: 'SafeHold', | ||
}; | ||
</script> |
Oops, something went wrong.