-
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.
- Loading branch information
1 parent
152e96f
commit 6b65e76
Showing
8 changed files
with
4,709 additions
and
4,162 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import { tracker, gotEmitter, HttpProtocol, HttpMethod } from "@snowplow/node-tracker"; | ||
import { newTracker } from "@snowplow/node-tracker"; | ||
|
||
const emitter = gotEmitter( | ||
"0.0.0.0", | ||
HttpProtocol.HTTPS, | ||
9090, | ||
HttpMethod.POST, | ||
1, // buffer size – 1 means that each event is sent right away, without buffering | ||
5, | ||
undefined, | ||
function (error, response) { | ||
// Callback called for each request | ||
if (error) { | ||
console.log(error, "Request error"); | ||
} else { | ||
console.log("Event Sent"); | ||
} | ||
export const expressTracker = newTracker( | ||
{ | ||
namespace: "myTracker", | ||
appId: "myApp", | ||
encodeBase64: false, | ||
}, | ||
{ | ||
customEmitter: () => ({ | ||
input: (payload) => { | ||
return Promise.resolve(); | ||
}, | ||
flush: () => { | ||
return Promise.resolve(); | ||
}, | ||
setCollectorUrl: (url) => {}, | ||
setAnonymousTracking: (anonymous) => {}, | ||
setBufferSize: (bufferSize) => {}, | ||
}), | ||
} | ||
); | ||
|
||
export const expressTracker = tracker(emitter, "myTracker", "myApp", false); |
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
Oops, something went wrong.