@nexly/core 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nexly.d.ts +2 -1
- package/dist/nexly.d.ts.map +1 -1
- package/dist/nexly.js +2 -1
- package/package.json +1 -1
package/dist/nexly.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Options for {@link Nexly}. `key` is the ingest API token (sent as `api_token` on the wire). */
|
|
2
2
|
export type NexlyInit = {
|
|
3
|
-
|
|
3
|
+
/** Override the ingest endpoint. Defaults to the Nexly production gateway. */
|
|
4
|
+
collectUrl?: string;
|
|
4
5
|
appId: string;
|
|
5
6
|
key: string;
|
|
6
7
|
};
|
package/dist/nexly.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nexly.d.ts","sourceRoot":"","sources":["../src/nexly.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nexly.d.ts","sourceRoot":"","sources":["../src/nexly.ts"],"names":[],"mappings":"AAMA,kGAAkG;AAClG,MAAM,MAAM,SAAS,GAAG;IACtB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,oGAAoG;IACpG,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAClC,CAAA;AAED;;GAEG;AACH,qBAAa,KAAK;IAChB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;gBAER,IAAI,EAAE,SAAS;IAM3B,OAAO,KAAK,WAAW,GAMtB;IAED,OAAO,CAAC,cAAc;IAOtB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO;IAIhC;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO;IActC;;OAEG;IACH,eAAe,IAAI,MAAM,IAAI;CAG9B"}
|
package/dist/nexly.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { collectBrowserMeta } from './browser-meta.js';
|
|
2
2
|
import { sendBeaconCollect } from './collect.js';
|
|
3
3
|
import { getDefaultPathname, sendPageViewBeacon, startEngagementTracking } from './events/index.js';
|
|
4
|
+
const DEFAULT_COLLECT_URL = 'https://gate.nexly.to/v1/collect';
|
|
4
5
|
/**
|
|
5
6
|
* High-level browser client: page views, custom events, optional engagement auto-tracking.
|
|
6
7
|
*/
|
|
@@ -9,7 +10,7 @@ export class Nexly {
|
|
|
9
10
|
appId;
|
|
10
11
|
key;
|
|
11
12
|
constructor(init) {
|
|
12
|
-
this.collectUrl = init.collectUrl.trim();
|
|
13
|
+
this.collectUrl = (init.collectUrl ?? DEFAULT_COLLECT_URL).trim();
|
|
13
14
|
this.appId = init.appId.trim();
|
|
14
15
|
this.key = init.key.trim();
|
|
15
16
|
}
|