rudder-sdk-js 1.2.11 → 1.2.13
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/index.d.ts +2 -0
- package/index.js +264 -97
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -9,14 +9,9 @@
|
|
9
9
|
|
10
10
|
if (Object.getOwnPropertySymbols) {
|
11
11
|
var symbols = Object.getOwnPropertySymbols(object);
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
16
|
-
});
|
17
|
-
}
|
18
|
-
|
19
|
-
keys.push.apply(keys, symbols);
|
12
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
13
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
14
|
+
})), keys.push.apply(keys, symbols);
|
20
15
|
}
|
21
16
|
|
22
17
|
return keys;
|
@@ -24,19 +19,12 @@
|
|
24
19
|
|
25
20
|
function _objectSpread2(target) {
|
26
21
|
for (var i = 1; i < arguments.length; i++) {
|
27
|
-
var source = arguments[i]
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
34
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
35
|
-
} else {
|
36
|
-
ownKeys(Object(source)).forEach(function (key) {
|
37
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
38
|
-
});
|
39
|
-
}
|
22
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
23
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
24
|
+
_defineProperty(target, key, source[key]);
|
25
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
26
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
27
|
+
});
|
40
28
|
}
|
41
29
|
|
42
30
|
return target;
|
@@ -45,17 +33,11 @@
|
|
45
33
|
function _typeof(obj) {
|
46
34
|
"@babel/helpers - typeof";
|
47
35
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
}
|
53
|
-
_typeof = function (obj) {
|
54
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
55
|
-
};
|
56
|
-
}
|
57
|
-
|
58
|
-
return _typeof(obj);
|
36
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
37
|
+
return typeof obj;
|
38
|
+
} : function (obj) {
|
39
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
40
|
+
}, _typeof(obj);
|
59
41
|
}
|
60
42
|
|
61
43
|
function _classCallCheck(instance, Constructor) {
|
@@ -77,6 +59,9 @@
|
|
77
59
|
function _createClass(Constructor, protoProps, staticProps) {
|
78
60
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
79
61
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
62
|
+
Object.defineProperty(Constructor, "prototype", {
|
63
|
+
writable: false
|
64
|
+
});
|
80
65
|
return Constructor;
|
81
66
|
}
|
82
67
|
|
@@ -5570,7 +5555,7 @@
|
|
5570
5555
|
PRODUCT_REVIEWED: "Product Reviewed"
|
5571
5556
|
}; // Enumeration for integrations supported
|
5572
5557
|
|
5573
|
-
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.2.
|
5558
|
+
var CONFIG_URL = "https://api.rudderlabs.com/sourceConfig/?p=npm&v=1.2.13";
|
5574
5559
|
var MAX_WAIT_FOR_INTEGRATION_LOAD = 10000;
|
5575
5560
|
var INTEGRATION_LOAD_CHECK_INTERVAL = 1000;
|
5576
5561
|
/* module.exports = {
|
@@ -23724,7 +23709,7 @@
|
|
23724
23709
|
return Appcues;
|
23725
23710
|
}();
|
23726
23711
|
|
23727
|
-
var BingAds = function BingAds(config) {
|
23712
|
+
var BingAds = /*#__PURE__*/_createClass(function BingAds(config) {
|
23728
23713
|
var _this = this;
|
23729
23714
|
|
23730
23715
|
_classCallCheck(this, BingAds);
|
@@ -23804,7 +23789,7 @@
|
|
23804
23789
|
|
23805
23790
|
this.tagID = config.tagID;
|
23806
23791
|
this.name = "BINGADS";
|
23807
|
-
};
|
23792
|
+
});
|
23808
23793
|
|
23809
23794
|
/*
|
23810
23795
|
E-commerce support required for logPurchase support & other e-commerce events as track with productId changed
|
@@ -26982,8 +26967,13 @@
|
|
26982
26967
|
}
|
26983
26968
|
}, {
|
26984
26969
|
key: "page",
|
26985
|
-
value: function page() {
|
26986
|
-
|
26970
|
+
value: function page(rudderElement) {
|
26971
|
+
var _rudderElement$messag = rudderElement.message,
|
26972
|
+
properties = _rudderElement$messag.properties,
|
26973
|
+
messageId = _rudderElement$messag.messageId;
|
26974
|
+
window.fbq("track", "PageView", properties, {
|
26975
|
+
eventID: messageId
|
26976
|
+
});
|
26987
26977
|
}
|
26988
26978
|
}, {
|
26989
26979
|
key: "identify",
|
@@ -26999,10 +26989,10 @@
|
|
26999
26989
|
var _this = this;
|
27000
26990
|
|
27001
26991
|
var self = this;
|
27002
|
-
var _rudderElement$
|
27003
|
-
event = _rudderElement$
|
27004
|
-
properties = _rudderElement$
|
27005
|
-
messageId = _rudderElement$
|
26992
|
+
var _rudderElement$messag2 = rudderElement.message,
|
26993
|
+
event = _rudderElement$messag2.event,
|
26994
|
+
properties = _rudderElement$messag2.properties,
|
26995
|
+
messageId = _rudderElement$messag2.messageId;
|
27006
26996
|
var revValue;
|
27007
26997
|
var currVal;
|
27008
26998
|
|
@@ -27313,25 +27303,25 @@
|
|
27313
27303
|
}
|
27314
27304
|
/**
|
27315
27305
|
* Get the Facebook Content Type
|
27316
|
-
*
|
27306
|
+
*
|
27317
27307
|
* Can be `product`, `destination`, `flight` or `hotel`.
|
27318
|
-
*
|
27308
|
+
*
|
27319
27309
|
* This can be overridden within the message
|
27320
27310
|
* `options.integrations.FACEBOOK_PIXEL.contentType`, or alternatively you can
|
27321
27311
|
* set the "Map Categories to Facebook Content Types" setting within
|
27322
27312
|
* RudderStack config and then set the corresponding commerce category in
|
27323
27313
|
* `track()` properties.
|
27324
|
-
*
|
27314
|
+
*
|
27325
27315
|
* https://www.facebook.com/business/help/606577526529702?id=1205376682832142
|
27326
27316
|
*/
|
27327
27317
|
|
27328
27318
|
}, {
|
27329
27319
|
key: "getContentType",
|
27330
27320
|
value: function getContentType(rudderElement, defaultValue) {
|
27331
|
-
var _rudderElement$
|
27321
|
+
var _rudderElement$messag3, _rudderElement$messag4;
|
27332
27322
|
|
27333
27323
|
// Get the message-specific override if it exists in the options parameter of `track()`
|
27334
|
-
var contentTypeMessageOverride = (_rudderElement$
|
27324
|
+
var contentTypeMessageOverride = (_rudderElement$messag3 = rudderElement.message.integrations) === null || _rudderElement$messag3 === void 0 ? void 0 : (_rudderElement$messag4 = _rudderElement$messag3.FACEBOOK_PIXEL) === null || _rudderElement$messag4 === void 0 ? void 0 : _rudderElement$messag4.contentType;
|
27335
27325
|
if (contentTypeMessageOverride) return [contentTypeMessageOverride]; // Otherwise check if there is a replacement set for all Facebook Pixel
|
27336
27326
|
// track calls of this category
|
27337
27327
|
|
@@ -29115,6 +29105,7 @@
|
|
29115
29105
|
this.pageLoadConversions = config.pageLoadConversions;
|
29116
29106
|
this.clickEventConversions = config.clickEventConversions;
|
29117
29107
|
this.defaultPageConversion = config.defaultPageConversion;
|
29108
|
+
this.dynamicRemarketing = config.dynamicRemarketing;
|
29118
29109
|
this.sendPageView = config.sendPageView || true;
|
29119
29110
|
this.conversionLinker = config.conversionLinker || true;
|
29120
29111
|
this.disableAdPersonalization = config.disableAdPersonalization || false;
|
@@ -29159,44 +29150,85 @@
|
|
29159
29150
|
}
|
29160
29151
|
}, {
|
29161
29152
|
key: "identify",
|
29162
|
-
value: function identify(
|
29153
|
+
value: function identify() {
|
29163
29154
|
logger.debug("[GoogleAds] identify:: method not supported");
|
29164
29155
|
} // https://developers.google.com/gtagjs/reference/event
|
29165
29156
|
|
29166
29157
|
}, {
|
29167
29158
|
key: "track",
|
29168
29159
|
value: function track(rudderElement) {
|
29169
|
-
logger.debug("in GoogleAdsAnalyticsManager track");
|
29170
|
-
|
29160
|
+
logger.debug("in GoogleAdsAnalyticsManager track"); // Dynamic remarketing disabled
|
29161
|
+
|
29162
|
+
if (!this.dynamicRemarketing) {
|
29163
|
+
var conversionData = this.getConversionData(this.clickEventConversions, rudderElement.message.event);
|
29164
|
+
|
29165
|
+
if (conversionData.conversionLabel) {
|
29166
|
+
var conversionLabel = conversionData.conversionLabel;
|
29167
|
+
var eventName = conversionData.eventName;
|
29168
|
+
var sendToValue = "".concat(this.conversionId, "/").concat(conversionLabel);
|
29169
|
+
var properties = {};
|
29170
|
+
|
29171
|
+
if (rudderElement.message.properties) {
|
29172
|
+
properties.value = rudderElement.message.properties.revenue;
|
29173
|
+
properties.currency = rudderElement.message.properties.currency;
|
29174
|
+
properties.transaction_id = rudderElement.message.properties.order_id;
|
29175
|
+
}
|
29171
29176
|
|
29172
|
-
|
29173
|
-
|
29174
|
-
|
29175
|
-
|
29176
|
-
|
29177
|
+
properties.send_to = sendToValue;
|
29178
|
+
properties = removeUndefinedAndNullValues(properties);
|
29179
|
+
window.gtag("event", eventName, properties);
|
29180
|
+
}
|
29181
|
+
} else {
|
29182
|
+
var event = rudderElement.message.event;
|
29183
|
+
|
29184
|
+
if (!event) {
|
29185
|
+
logger.error("Event name not present");
|
29186
|
+
return;
|
29187
|
+
}
|
29188
|
+
|
29189
|
+
var payload = {};
|
29190
|
+
var _sendToValue = this.conversionId;
|
29177
29191
|
|
29178
29192
|
if (rudderElement.message.properties) {
|
29179
|
-
|
29180
|
-
properties.currency = rudderElement.message.properties.currency;
|
29181
|
-
properties.transaction_id = rudderElement.message.properties.order_id;
|
29193
|
+
payload = rudderElement.message.properties;
|
29182
29194
|
}
|
29183
29195
|
|
29184
|
-
|
29185
|
-
window.gtag("event",
|
29196
|
+
payload.send_to = _sendToValue;
|
29197
|
+
window.gtag("event", event, payload);
|
29186
29198
|
}
|
29187
29199
|
}
|
29188
29200
|
}, {
|
29189
29201
|
key: "page",
|
29190
29202
|
value: function page(rudderElement) {
|
29191
|
-
logger.debug("in GoogleAdsAnalyticsManager page");
|
29192
|
-
|
29193
|
-
|
29194
|
-
|
29195
|
-
|
29196
|
-
|
29197
|
-
|
29198
|
-
|
29199
|
-
|
29203
|
+
logger.debug("in GoogleAdsAnalyticsManager page"); // Dynamic re-marketing is disabled
|
29204
|
+
|
29205
|
+
if (!this.dynamicRemarketing) {
|
29206
|
+
var conversionData = this.getConversionData(this.pageLoadConversions, rudderElement.message.name);
|
29207
|
+
|
29208
|
+
if (conversionData.conversionLabel) {
|
29209
|
+
var conversionLabel = conversionData.conversionLabel;
|
29210
|
+
var eventName = conversionData.eventName;
|
29211
|
+
window.gtag("event", eventName, {
|
29212
|
+
send_to: "".concat(this.conversionId, "/").concat(conversionLabel)
|
29213
|
+
});
|
29214
|
+
}
|
29215
|
+
} else {
|
29216
|
+
var event = rudderElement.message.name;
|
29217
|
+
|
29218
|
+
if (!event) {
|
29219
|
+
logger.error("Event name not present");
|
29220
|
+
return;
|
29221
|
+
}
|
29222
|
+
|
29223
|
+
var payload = {};
|
29224
|
+
var sendToValue = this.conversionId;
|
29225
|
+
|
29226
|
+
if (rudderElement.message.properties) {
|
29227
|
+
payload = rudderElement.message.properties;
|
29228
|
+
}
|
29229
|
+
|
29230
|
+
payload.send_to = sendToValue;
|
29231
|
+
window.gtag("event", event, payload);
|
29200
29232
|
}
|
29201
29233
|
}
|
29202
29234
|
}, {
|
@@ -30457,6 +30489,102 @@
|
|
30457
30489
|
return Kissmetrics;
|
30458
30490
|
}();
|
30459
30491
|
|
30492
|
+
/* eslint-disable no-param-reassign */
|
30493
|
+
|
30494
|
+
var itemsPayload = function itemsPayload(item) {
|
30495
|
+
var itemObj = {};
|
30496
|
+
itemObj.ProductID = item.product_id;
|
30497
|
+
itemObj.SKU = item.sku;
|
30498
|
+
itemObj.ProductName = item.name;
|
30499
|
+
itemObj.Quantity = item.quantity;
|
30500
|
+
itemObj.ItemPrice = item.price;
|
30501
|
+
itemObj.RowTotal = item.total;
|
30502
|
+
itemObj.ProductURL = item.url;
|
30503
|
+
itemObj.ImageURL = item.image_url;
|
30504
|
+
itemObj.ProductCategories = item.categories;
|
30505
|
+
return itemObj;
|
30506
|
+
};
|
30507
|
+
|
30508
|
+
var ecommEventPayload = function ecommEventPayload(event, message) {
|
30509
|
+
var payload = {};
|
30510
|
+
|
30511
|
+
switch (event) {
|
30512
|
+
case "Viewed Product":
|
30513
|
+
{
|
30514
|
+
payload.ProductName = getValue(message, "properties.name");
|
30515
|
+
payload.ProductID = getValue(message, "properties.product_id");
|
30516
|
+
payload.SKU = getValue(message, "properties.sku");
|
30517
|
+
payload.ImageURL = getValue(message, "properties.image_url");
|
30518
|
+
payload.URL = getValue(message, "properties.url");
|
30519
|
+
payload.Brand = getValue(message, "properties.brand");
|
30520
|
+
payload.Price = getValue(message, "properties.price");
|
30521
|
+
payload.CompareAtPrice = getValue(message, "properties.compare_at_price");
|
30522
|
+
payload.Categories = getValue(message, "properties.categories");
|
30523
|
+
break;
|
30524
|
+
}
|
30525
|
+
|
30526
|
+
case "Added to Cart":
|
30527
|
+
{
|
30528
|
+
payload.$value = getValue(message, "properties.value");
|
30529
|
+
payload.AddedItemProductName = getValue(message, "properties.name");
|
30530
|
+
payload.AddedItemProductID = getValue(message, "properties.product_id");
|
30531
|
+
payload.AddedItemSKU = getValue(message, "properties.sku");
|
30532
|
+
payload.AddedItemImageURL = getValue(message, "properties.image_url");
|
30533
|
+
payload.AddedItemURL = getValue(message, "properties.url");
|
30534
|
+
payload.AddedItemPrice = getValue(message, "properties.price");
|
30535
|
+
payload.AddedItemQuantity = getValue(message, "properties.quantity");
|
30536
|
+
payload.AddedItemCategories = getValue(message, "properties.categories");
|
30537
|
+
payload.ItemNames = getValue(message, "properties.item_names");
|
30538
|
+
payload.CheckoutURL = getValue(message, "properties.checkout_url");
|
30539
|
+
|
30540
|
+
if (message.properties.items && Array.isArray(message.properties.items)) {
|
30541
|
+
var itemArr = [];
|
30542
|
+
message.properties.items.forEach(function (element) {
|
30543
|
+
var item = itemsPayload(element);
|
30544
|
+
item = removeUndefinedAndNullValues(item);
|
30545
|
+
|
30546
|
+
if (isNotEmpty(item)) {
|
30547
|
+
itemArr.push(item);
|
30548
|
+
}
|
30549
|
+
});
|
30550
|
+
payload.Items = itemArr;
|
30551
|
+
}
|
30552
|
+
|
30553
|
+
break;
|
30554
|
+
}
|
30555
|
+
|
30556
|
+
case "Started Checkout":
|
30557
|
+
{
|
30558
|
+
payload.$event_id = getValue(message, "properties.order_id");
|
30559
|
+
payload.$value = getValue(message, "properties.value");
|
30560
|
+
payload.Categories = getValue(message, "properties.categories");
|
30561
|
+
payload.CheckoutURL = getValue(message, "properties.checkout_url");
|
30562
|
+
payload.ItemNames = getValue(message, "item_names");
|
30563
|
+
|
30564
|
+
if (message.properties.items && Array.isArray(message.properties.items)) {
|
30565
|
+
var _itemArr = [];
|
30566
|
+
message.properties.items.forEach(function (element) {
|
30567
|
+
var item = itemsPayload(element);
|
30568
|
+
item = removeUndefinedAndNullValues(item);
|
30569
|
+
|
30570
|
+
if (isNotEmpty(item)) {
|
30571
|
+
_itemArr.push(item);
|
30572
|
+
}
|
30573
|
+
});
|
30574
|
+
payload.Items = _itemArr;
|
30575
|
+
}
|
30576
|
+
|
30577
|
+
break;
|
30578
|
+
}
|
30579
|
+
}
|
30580
|
+
|
30581
|
+
if (payload) {
|
30582
|
+
payload = removeUndefinedAndNullValues(payload);
|
30583
|
+
}
|
30584
|
+
|
30585
|
+
return payload;
|
30586
|
+
};
|
30587
|
+
|
30460
30588
|
var Klaviyo = /*#__PURE__*/function () {
|
30461
30589
|
function Klaviyo(config) {
|
30462
30590
|
_classCallCheck(this, Klaviyo);
|
@@ -30468,6 +30596,14 @@
|
|
30468
30596
|
this.name = "KLAVIYO";
|
30469
30597
|
this.keysToExtract = ["context.traits"];
|
30470
30598
|
this.exclusionKeys = ["email", "E-mail", "Email", "firstName", "firstname", "first_name", "lastName", "lastname", "last_name", "phone", "Phone", "title", "organization", "city", "City", "region", "country", "Country", "zip", "image", "timezone", "anonymousId", "userId", "properties"];
|
30599
|
+
this.ecomExclusionKeys = ["name", "product_id", "sku", "image_url", "url", "brand", "price", "compare_at_price", "quantity", "categories", "products", "product_names", "order_id", "value", "checkout_url", "item_names", "items", "checkout_url"];
|
30600
|
+
this.ecomEvents = ["product viewed", "product clicked", "product added", "checkout started"];
|
30601
|
+
this.eventNameMapping = {
|
30602
|
+
"product viewed": "Viewed Product",
|
30603
|
+
"product clicked": "Viewed Product",
|
30604
|
+
"product added": "Added to Cart",
|
30605
|
+
"checkout started": "Started Checkout"
|
30606
|
+
};
|
30471
30607
|
}
|
30472
30608
|
|
30473
30609
|
_createClass(Klaviyo, [{
|
@@ -30546,14 +30682,33 @@
|
|
30546
30682
|
var message = rudderElement.message;
|
30547
30683
|
|
30548
30684
|
if (message.properties) {
|
30549
|
-
|
30685
|
+
// ecomm events
|
30686
|
+
var event = getValue(message, "event");
|
30687
|
+
event = event ? event.trim().toLowerCase() : event;
|
30688
|
+
|
30689
|
+
if (this.ecomEvents.includes(event)) {
|
30690
|
+
var payload = ecommEventPayload(this.eventNameMapping[event], message);
|
30691
|
+
var eventName = this.eventNameMapping[event];
|
30692
|
+
var customProperties = {};
|
30693
|
+
customProperties = extractCustomFields(message, customProperties, ["properties"], this.ecomExclusionKeys);
|
30694
|
+
|
30695
|
+
if (isNotEmpty(customProperties)) {
|
30696
|
+
payload = _objectSpread2(_objectSpread2({}, payload), customProperties);
|
30697
|
+
}
|
30550
30698
|
|
30551
|
-
|
30552
|
-
|
30553
|
-
|
30554
|
-
}
|
30699
|
+
if (isNotEmpty(payload)) {
|
30700
|
+
window._learnq.push(["track", eventName, payload]);
|
30701
|
+
}
|
30702
|
+
} else {
|
30703
|
+
var propsPayload = message.properties;
|
30704
|
+
|
30705
|
+
if (propsPayload.revenue) {
|
30706
|
+
propsPayload.$value = propsPayload.revenue;
|
30707
|
+
delete propsPayload.revenue;
|
30708
|
+
}
|
30555
30709
|
|
30556
|
-
|
30710
|
+
window._learnq.push(["track", message.event, propsPayload]);
|
30711
|
+
}
|
30557
30712
|
} else window._learnq.push(["track", message.event]);
|
30558
30713
|
}
|
30559
30714
|
}, {
|
@@ -33220,7 +33375,7 @@
|
|
33220
33375
|
return payload;
|
33221
33376
|
};
|
33222
33377
|
|
33223
|
-
var ecommEventPayload = function ecommEventPayload(event, message) {
|
33378
|
+
var ecommEventPayload$1 = function ecommEventPayload(event, message) {
|
33224
33379
|
var payload = {
|
33225
33380
|
price: getValue(message, "properties.price"),
|
33226
33381
|
currency: getValue(message, "properties.currency"),
|
@@ -33479,31 +33634,31 @@
|
|
33479
33634
|
|
33480
33635
|
switch (event.toLowerCase().trim()) {
|
33481
33636
|
case "order completed":
|
33482
|
-
sendEvent(this.ecomEvents.PURCHASE, ecommEventPayload(event, message));
|
33637
|
+
sendEvent(this.ecomEvents.PURCHASE, ecommEventPayload$1(event, message));
|
33483
33638
|
break;
|
33484
33639
|
|
33485
33640
|
case "checkout started":
|
33486
|
-
sendEvent(this.ecomEvents.START_CHECKOUT, ecommEventPayload(event, message));
|
33641
|
+
sendEvent(this.ecomEvents.START_CHECKOUT, ecommEventPayload$1(event, message));
|
33487
33642
|
break;
|
33488
33643
|
|
33489
33644
|
case "product added":
|
33490
|
-
sendEvent(this.ecomEvents.ADD_CART, ecommEventPayload(event, message));
|
33645
|
+
sendEvent(this.ecomEvents.ADD_CART, ecommEventPayload$1(event, message));
|
33491
33646
|
break;
|
33492
33647
|
|
33493
33648
|
case "payment info entered":
|
33494
|
-
sendEvent(this.ecomEvents.ADD_BILLING, ecommEventPayload(event, message));
|
33649
|
+
sendEvent(this.ecomEvents.ADD_BILLING, ecommEventPayload$1(event, message));
|
33495
33650
|
break;
|
33496
33651
|
|
33497
33652
|
case "promotion clicked":
|
33498
|
-
sendEvent(this.ecomEvents.AD_CLICK, ecommEventPayload(event, message));
|
33653
|
+
sendEvent(this.ecomEvents.AD_CLICK, ecommEventPayload$1(event, message));
|
33499
33654
|
break;
|
33500
33655
|
|
33501
33656
|
case "promotion viewed":
|
33502
|
-
sendEvent(this.ecomEvents.AD_VIEW, ecommEventPayload(event, message));
|
33657
|
+
sendEvent(this.ecomEvents.AD_VIEW, ecommEventPayload$1(event, message));
|
33503
33658
|
break;
|
33504
33659
|
|
33505
33660
|
case "product added to wishlist":
|
33506
|
-
sendEvent(this.ecomEvents.ADD_TO_WISHLIST, ecommEventPayload(event, message));
|
33661
|
+
sendEvent(this.ecomEvents.ADD_TO_WISHLIST, ecommEventPayload$1(event, message));
|
33507
33662
|
break;
|
33508
33663
|
|
33509
33664
|
default:
|
@@ -34082,33 +34237,33 @@
|
|
34082
34237
|
};
|
34083
34238
|
|
34084
34239
|
// Application class
|
34085
|
-
var RudderApp = function RudderApp() {
|
34240
|
+
var RudderApp = /*#__PURE__*/_createClass(function RudderApp() {
|
34086
34241
|
_classCallCheck(this, RudderApp);
|
34087
34242
|
|
34088
34243
|
this.build = "1.0.0";
|
34089
34244
|
this.name = "RudderLabs JavaScript SDK";
|
34090
34245
|
this.namespace = "com.rudderlabs.javascript";
|
34091
|
-
this.version = "1.2.
|
34092
|
-
};
|
34246
|
+
this.version = "1.2.13";
|
34247
|
+
});
|
34093
34248
|
|
34094
34249
|
// Library information class
|
34095
|
-
var RudderLibraryInfo = function RudderLibraryInfo() {
|
34250
|
+
var RudderLibraryInfo = /*#__PURE__*/_createClass(function RudderLibraryInfo() {
|
34096
34251
|
_classCallCheck(this, RudderLibraryInfo);
|
34097
34252
|
|
34098
34253
|
this.name = "RudderLabs JavaScript SDK";
|
34099
|
-
this.version = "1.2.
|
34100
|
-
}; // Operating System information class
|
34254
|
+
this.version = "1.2.13";
|
34255
|
+
}); // Operating System information class
|
34101
34256
|
|
34102
34257
|
|
34103
|
-
var RudderOSInfo = function RudderOSInfo() {
|
34258
|
+
var RudderOSInfo = /*#__PURE__*/_createClass(function RudderOSInfo() {
|
34104
34259
|
_classCallCheck(this, RudderOSInfo);
|
34105
34260
|
|
34106
34261
|
this.name = "";
|
34107
34262
|
this.version = "";
|
34108
|
-
}; // Screen information class
|
34263
|
+
}); // Screen information class
|
34109
34264
|
|
34110
34265
|
|
34111
|
-
var RudderScreenInfo = function RudderScreenInfo() {
|
34266
|
+
var RudderScreenInfo = /*#__PURE__*/_createClass(function RudderScreenInfo() {
|
34112
34267
|
_classCallCheck(this, RudderScreenInfo);
|
34113
34268
|
|
34114
34269
|
this.density = 0;
|
@@ -34116,9 +34271,9 @@
|
|
34116
34271
|
this.height = 0;
|
34117
34272
|
this.innerWidth = 0;
|
34118
34273
|
this.innerHeight = 0;
|
34119
|
-
}; // Device information class
|
34274
|
+
}); // Device information class
|
34120
34275
|
|
34121
|
-
var RudderContext = function RudderContext() {
|
34276
|
+
var RudderContext = /*#__PURE__*/_createClass(function RudderContext() {
|
34122
34277
|
_classCallCheck(this, RudderContext);
|
34123
34278
|
|
34124
34279
|
this.app = new RudderApp();
|
@@ -34156,7 +34311,7 @@
|
|
34156
34311
|
this.screen = screen;
|
34157
34312
|
this.device = null;
|
34158
34313
|
this.network = null;
|
34159
|
-
};
|
34314
|
+
});
|
34160
34315
|
|
34161
34316
|
var RudderMessage = /*#__PURE__*/function () {
|
34162
34317
|
function RudderMessage() {
|
@@ -35786,12 +35941,12 @@
|
|
35786
35941
|
var lib$2 = Queue;
|
35787
35942
|
|
35788
35943
|
// Payload class, contains batch of Elements
|
35789
|
-
var RudderPayload = function RudderPayload() {
|
35944
|
+
var RudderPayload = /*#__PURE__*/_createClass(function RudderPayload() {
|
35790
35945
|
_classCallCheck(this, RudderPayload);
|
35791
35946
|
|
35792
35947
|
this.batch = null;
|
35793
35948
|
this.writeKey = null;
|
35794
|
-
};
|
35949
|
+
});
|
35795
35950
|
|
35796
35951
|
var queueOptions = {
|
35797
35952
|
maxRetryDelay: 360000,
|
@@ -37422,16 +37577,28 @@
|
|
37422
37577
|
throw Error("failed to initialize");
|
37423
37578
|
}
|
37424
37579
|
|
37580
|
+
var storageOptions = {};
|
37581
|
+
|
37425
37582
|
if (options && options.logLevel) {
|
37426
37583
|
logger.setLogLevel(options.logLevel);
|
37427
37584
|
}
|
37428
37585
|
|
37429
37586
|
if (options && options.setCookieDomain) {
|
37430
|
-
|
37587
|
+
storageOptions = _objectSpread2(_objectSpread2({}, storageOptions), {}, {
|
37431
37588
|
domain: options.setCookieDomain
|
37432
37589
|
});
|
37433
37590
|
}
|
37434
37591
|
|
37592
|
+
if (options && options.secureCookie) {
|
37593
|
+
storageOptions = _objectSpread2(_objectSpread2({}, storageOptions), {}, {
|
37594
|
+
secure: options.secureCookie
|
37595
|
+
});
|
37596
|
+
}
|
37597
|
+
|
37598
|
+
if (isNotEmpty(storageOptions)) {
|
37599
|
+
this.storage.options(storageOptions);
|
37600
|
+
}
|
37601
|
+
|
37435
37602
|
if (options && options.integrations) {
|
37436
37603
|
_extends(this.loadOnlyIntegrations, options.integrations);
|
37437
37604
|
|