-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathanalytics.js
More file actions
25 lines (20 loc) · 803 Bytes
/
Copy pathanalytics.js
File metadata and controls
25 lines (20 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const https = require('https');
// These analytics ONLY send event names for understanding usage of the librarian.
// Absolutely NO system metadata or personal information is ever collected or sent.
///// Simple, Privary Aware Analytics: https://curl.press
const sendEvent = async (event) => {
if (event && event.length && event.length > 0) {
try {
const req = https.get(`https://curl.press/api/librarian/add?event=${event}`).on('error', function(err) {})
} catch (error) {}
}
}
const LibrarianEvents = {
SetupStarted: "setup.start",
SetupComplete: "setup.finish",
SetupError: "setup.error",
ServerStarted: "server.start",
ServerError: "server.error",
BuildSubmitted: "build.submit"
}
module.exports = { sendEvent, LibrarianEvents };