@useblu/blu-lytics 1.0.15 → 1.0.16
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dispatchers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,KAAG,IAkClE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dispatchers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,cAAc,EACd,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAG7B;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,KAAG,IAkClE,CAAC;AAOF,QAAA,MAAM,eAAe,WAAY,MAAM,KAAG,IAMzC,CAAC;AAeF,QAAA,MAAM,oBAAoB,eAAgB,cAAc,KAAG,IAG1D,CAAC;AAEF,QAAA,MAAM,eAAe,UAAW,MAAM,cAAc,cAAc,KAAG,IAyBpE,CAAC;AAEF,QAAA,MAAM,sBAAsB,OACtB,MAAM,kBACM,kBAAkB,KACjC,IAUF,CAAC;AAEF,OAAO,EACL,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,oBAAoB,GACrB,CAAC"}
|
package/lib/dispatchers/index.js
CHANGED
|
@@ -51,10 +51,12 @@ export var dispatchEventToAllProviders = function (eventData) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
var
|
|
55
|
-
var
|
|
54
|
+
var getIsDevelopment = function () {
|
|
55
|
+
var currentEnvironment = localStorage.getItem('_bl_env') || 'development';
|
|
56
|
+
return currentEnvironment === 'development';
|
|
57
|
+
};
|
|
56
58
|
var sendScreenEvent = function (screen) {
|
|
57
|
-
if (
|
|
59
|
+
if (getIsDevelopment()) {
|
|
58
60
|
console.log("[blu-lytics]: Screen event: ".concat(screen));
|
|
59
61
|
}
|
|
60
62
|
else {
|
|
@@ -84,7 +86,7 @@ var sendCustomEvent = function (event, properties) {
|
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
var mergedProperties = __assign(__assign({}, defaultProperties), properties);
|
|
87
|
-
if (
|
|
89
|
+
if (getIsDevelopment()) {
|
|
88
90
|
console.log("[blu-lytics]: Custom event: ".concat(event, " - ").concat(JSON.stringify(mergedProperties)));
|
|
89
91
|
}
|
|
90
92
|
else {
|
|
@@ -92,7 +94,7 @@ var sendCustomEvent = function (event, properties) {
|
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
96
|
var sendUserIdentification = function (id, userProperties) {
|
|
95
|
-
if (
|
|
97
|
+
if (getIsDevelopment()) {
|
|
96
98
|
console.log("[blu-lytics]: User identification: ".concat(id, " - ").concat(JSON.stringify(userProperties)));
|
|
97
99
|
}
|
|
98
100
|
else {
|