Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 5d05f73

Browse files
authored
Merge pull request #246 from gofynd/master
Allow to update endpoint to send batch events
2 parents 94a7370 + efeb3b8 commit 5d05f73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class Analytics {
3535
this.queue = []
3636
this.writeKey = writeKey
3737
this.host = removeSlash(options.host || 'https://api.segment.io')
38+
this.path = removeSlash(options.path || '/v1/batch')
3839
this.timeout = options.timeout || false
3940
this.flushAt = Math.max(options.flushAt, 1) || 20
4041
this.flushInterval = options.flushInterval || 10000
@@ -267,7 +268,7 @@ class Analytics {
267268

268269
const req = {
269270
method: 'POST',
270-
url: `${this.host}/v1/batch`,
271+
url: `${this.host}${this.path}`,
271272
auth: {
272273
username: this.writeKey
273274
},

0 commit comments

Comments
 (0)