@hackler/js-client-sdk
Advanced tools
Comparing version
@@ -6,3 +6,3 @@ export declare const WORKSPACE_FETCH_URL = "https://sdk.hackle.io/api/v1/w/workspaces"; | ||
export declare const SDK_VERSION_HEADER = "X-HACKLE-SDK-VERSION"; | ||
export declare const SDK_VERSION = "1.0.3"; | ||
export declare const SDK_VERSION = "1.0.4"; | ||
export declare const DEFAULT_POOL_INTERVAL = 10000; | ||
@@ -9,0 +9,0 @@ export declare const REQUEST_TIME_OUT = 10000; |
@@ -6,3 +6,3 @@ export var WORKSPACE_FETCH_URL = "https://sdk.hackle.io/api/v1/w/workspaces"; | ||
export var SDK_VERSION_HEADER = "X-HACKLE-SDK-VERSION"; | ||
export var SDK_VERSION = "1.0.3"; | ||
export var SDK_VERSION = "1.0.4"; | ||
export var DEFAULT_POOL_INTERVAL = 10000; | ||
@@ -9,0 +9,0 @@ export var REQUEST_TIME_OUT = 10000; |
@@ -28,3 +28,3 @@ import { createInstance as createHackleInstance } from "@hackler/sdk-core"; | ||
window.addEventListener("beforeunload", flush); | ||
window.addEventListener("unload", flush); | ||
window.addEventListener("onpagehide" in window ? "pagehide" : "unload", flush); | ||
return hackleClient; | ||
@@ -31,0 +31,0 @@ } |
{ | ||
"name": "@hackler/js-client-sdk", | ||
"version": "1.0.3", | ||
"version": "1.0.5", | ||
"description": "JavaScript Client(Web Browser) SDK", | ||
@@ -38,3 +38,3 @@ "author": { | ||
"dependencies": { | ||
"@hackler/sdk-core": "^1.0.2" | ||
"@hackler/sdk-core": "^1.0.3" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
@@ -16,3 +16,3 @@ #Hackle JavaScript Client(Web Browser) SDK | ||
hackleClient.on("ready", () => { | ||
hackleClient.onReady(() => { | ||
const variation = hackleClient.variation(AB_TEST_KEY, { id: USER_ID }); | ||
@@ -30,3 +30,5 @@ | ||
```javascript | ||
hackleClient.track(EVENT_KEY, { id: USER_ID }); | ||
hackleClient.onReady(() => { | ||
hackleClient.track(EVENT_KEY, { id: USER_ID }); | ||
}); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
761310
0.31%21
5%2242
0.13%33
6.45%2
100%80
-20%Updated