@usermaven/nextjs 1.2.6 → 1.2.7
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/lib/index.es.js +6 -4
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1399,8 +1399,8 @@ _safewrap_instance_methods(autocapture);
|
|
|
1399
1399
|
|
|
1400
1400
|
var VERSION_INFO = {
|
|
1401
1401
|
env: 'production',
|
|
1402
|
-
date: '2023-12-
|
|
1403
|
-
version: '1.2.
|
|
1402
|
+
date: '2023-12-21T09:27:52.618Z',
|
|
1403
|
+
version: '1.2.7'
|
|
1404
1404
|
};
|
|
1405
1405
|
var USERMAVEN_VERSION = VERSION_INFO.version + "/" + VERSION_INFO.env + "@" + VERSION_INFO.date;
|
|
1406
1406
|
var MAX_AGE_TEN_YEARS = 31622400 * 10;
|
|
@@ -1727,6 +1727,7 @@ var UsermavenClientImpl = /** @class */ (function () {
|
|
|
1727
1727
|
this.trackingHost = "";
|
|
1728
1728
|
this.idCookieName = "";
|
|
1729
1729
|
this.randomizeUrl = false;
|
|
1730
|
+
this.namespace = "usermaven";
|
|
1730
1731
|
this.apiKey = "";
|
|
1731
1732
|
this.initialized = false;
|
|
1732
1733
|
this._3pCookies = {};
|
|
@@ -1866,7 +1867,7 @@ var UsermavenClientImpl = /** @class */ (function () {
|
|
|
1866
1867
|
url = this.trackingHost + "/api." + generateRandom() + "?p_" + generateRandom() + "=" + this.apiKey + cookiePolicy + ipPolicy;
|
|
1867
1868
|
}
|
|
1868
1869
|
var jsonString = JSON.stringify(json);
|
|
1869
|
-
getLogger().debug("Sending payload to " + url,
|
|
1870
|
+
getLogger().debug("Sending payload to " + url, json.length);
|
|
1870
1871
|
return this.transport(url, jsonString, this.customHeaders(), function (code, body) {
|
|
1871
1872
|
return _this.postHandle(code, body);
|
|
1872
1873
|
});
|
|
@@ -2101,6 +2102,7 @@ var UsermavenClientImpl = /** @class */ (function () {
|
|
|
2101
2102
|
? defaultCompatMode
|
|
2102
2103
|
: !!options.compat_mode;
|
|
2103
2104
|
this.cookieDomain = options.cookie_domain || getCookieDomain();
|
|
2105
|
+
this.namespace = options.namespace || "usermaven";
|
|
2104
2106
|
this.trackingHost = getHostWithProtocol(options["tracking_host"] || "t.usermaven.com");
|
|
2105
2107
|
this.randomizeUrl = options.randomize_url || false;
|
|
2106
2108
|
this.apiKey = options.key;
|
|
@@ -2164,7 +2166,7 @@ var UsermavenClientImpl = /** @class */ (function () {
|
|
|
2164
2166
|
}
|
|
2165
2167
|
if (isWindowAvailable()) {
|
|
2166
2168
|
if (!options.disable_event_persistence) {
|
|
2167
|
-
this.queue = new LocalStorageQueue("
|
|
2169
|
+
this.queue = new LocalStorageQueue(this.namespace + "-event-queue");
|
|
2168
2170
|
this.scheduleFlush(0);
|
|
2169
2171
|
}
|
|
2170
2172
|
window.addEventListener("beforeunload", function () { return _this.flush(); });
|