@mparticle/web-sdk 2.12.9 → 2.14.2

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/mparticle.js CHANGED
@@ -719,7 +719,7 @@ var mParticle = (function () {
719
719
  TriggerUploadType: TriggerUploadType
720
720
  };
721
721
 
722
- var version = "2.12.9";
722
+ var version = "2.14.2";
723
723
 
724
724
  var Constants = {
725
725
  sdkVersion: version,
@@ -2691,7 +2691,8 @@ var mParticle = (function () {
2691
2691
  var astEventData = {
2692
2692
  application_transition_type: dist_3.applicationInitialized,
2693
2693
  is_first_run: sdkEvent.IsFirstRun,
2694
- is_upgrade: false
2694
+ is_upgrade: false,
2695
+ launch_referral: sdkEvent.LaunchReferral
2695
2696
  };
2696
2697
  astEventData = Object.assign(astEventData, commonEventData);
2697
2698
  return {
@@ -3414,7 +3415,13 @@ var mParticle = (function () {
3414
3415
  });
3415
3416
  };
3416
3417
 
3417
- this.sendEventToServer = function (event) {
3418
+ this.sendEventToServer = function (event, _options) {
3419
+ var defaultOptions = {
3420
+ shouldUploadEvent: true
3421
+ };
3422
+
3423
+ var options = mpInstance._Helpers.extend(defaultOptions, _options);
3424
+
3418
3425
  if (mpInstance._Store.webviewBridgeEnabled) {
3419
3426
  mpInstance._NativeSdkHelpers.sendToNative(Constants.NativeSdkPaths.LogEvent, JSON.stringify(event));
3420
3427
 
@@ -3441,16 +3448,20 @@ var mParticle = (function () {
3441
3448
 
3442
3449
  this.processQueuedEvents();
3443
3450
 
3444
- if (this.shouldEnableBatching()) {
3445
- this.queueEventForBatchUpload(event);
3446
- } else {
3447
- this.sendSingleEventToServer(event);
3451
+ if (event && options.shouldUploadEvent) {
3452
+ if (this.shouldEnableBatching()) {
3453
+ this.queueEventForBatchUpload(event);
3454
+ } else {
3455
+ this.sendSingleEventToServer(event);
3456
+ }
3448
3457
  }
3449
3458
 
3450
3459
  if (event && event.EventName !== Types.MessageType.AppStateTransition) {
3451
3460
  if (kitBlocker && kitBlocker.kitBlockingEnabled) {
3452
3461
  event = kitBlocker.createBlockedEvent(event);
3453
- }
3462
+ } // We need to check event again, because kitblocking
3463
+ // can nullify the event
3464
+
3454
3465
 
3455
3466
  if (event) {
3456
3467
  mpInstance._Forwarders.sendEventToForwarders(event);
@@ -3572,7 +3583,7 @@ var mParticle = (function () {
3572
3583
  module.exports['default'] = factory();
3573
3584
  }
3574
3585
  }('slugify', commonjsGlobal, function () {
3575
- var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\\"","”":"\\\"","„":"\\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}');
3586
+ var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\\"","”":"\\\"","„":"\\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}');
3576
3587
  var locales = JSON.parse('{"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"}}');
3577
3588
 
3578
3589
  function replace (string, options) {
@@ -3588,6 +3599,8 @@ var mParticle = (function () {
3588
3599
 
3589
3600
  var replacement = options.replacement === undefined ? '-' : options.replacement;
3590
3601
 
3602
+ var trim = options.trim === undefined ? true : options.trim;
3603
+
3591
3604
  var slug = string.normalize().split('')
3592
3605
  // replace characters based on charMap
3593
3606
  .reduce(function (result, ch) {
@@ -3600,11 +3613,13 @@ var mParticle = (function () {
3600
3613
  slug = slug.replace(/[^A-Za-z0-9\s]/g, '');
3601
3614
  }
3602
3615
 
3603
- // Remove leading/trailing spaces, then replace all other spaces with
3604
- // replacement character, treating multiple consecutive spaces as a single
3605
- // space.
3606
- slug = slug.trim()
3607
- .replace(/\s+/g, replacement);
3616
+ if (trim) {
3617
+ slug = slug.trim();
3618
+ }
3619
+
3620
+ // Replace spaces with replacement character, treating multiple consecutive
3621
+ // spaces as a single space.
3622
+ slug = slug.replace(/\s+/g, replacement);
3608
3623
 
3609
3624
  if (options.lower) {
3610
3625
  slug = slug.toLowerCase();
@@ -3912,8 +3927,7 @@ var mParticle = (function () {
3912
3927
  -1e3 + // -1000 +
3913
3928
  -4e3 + // -4000 +
3914
3929
  -8e3 + // -80000000 +
3915
- -1e11). // -100000000000,
3916
- replace( // replacing
3930
+ -1e11).replace( // replacing
3917
3931
  /[018]/g, // zeroes, ones, and eights with
3918
3932
  self.generateUniqueId // random hex digits
3919
3933
  );
@@ -4434,10 +4448,14 @@ var mParticle = (function () {
4434
4448
  if (mpInstance._Consent.isEnabledForUserConsent(filteringConsentRuleValues, mpInstance.Identity.getCurrentUser())) {
4435
4449
  var img = document.createElement('img');
4436
4450
  mpInstance.Logger.verbose(Messages$2.InformationMessages.CookieSync);
4437
- img.src = url;
4438
- cookieSyncDates[moduleId.toString()] = new Date().getTime();
4439
4451
 
4440
- mpInstance._Persistence.saveUserCookieSyncDatesToPersistence(mpid, cookieSyncDates);
4452
+ img.onload = function () {
4453
+ cookieSyncDates[moduleId.toString()] = new Date().getTime();
4454
+
4455
+ mpInstance._Persistence.saveUserCookieSyncDatesToPersistence(mpid, cookieSyncDates);
4456
+ };
4457
+
4458
+ img.src = url;
4441
4459
  }
4442
4460
  };
4443
4461
  }
@@ -6425,13 +6443,13 @@ var mParticle = (function () {
6425
6443
  function Events(mpInstance) {
6426
6444
  var self = this;
6427
6445
 
6428
- this.logEvent = function (event) {
6446
+ this.logEvent = function (event, options) {
6429
6447
  mpInstance.Logger.verbose(Messages$6.InformationMessages.StartingLogEvent + ': ' + event.name);
6430
6448
 
6431
6449
  if (mpInstance._Helpers.canLog()) {
6432
6450
  var uploadObject = mpInstance._ServerModel.createEventObject(event);
6433
6451
 
6434
- mpInstance._APIClient.sendEventToServer(uploadObject);
6452
+ mpInstance._APIClient.sendEventToServer(uploadObject, options);
6435
6453
  } else {
6436
6454
  mpInstance.Logger.verbose(Messages$6.InformationMessages.AbandonLogEvent);
6437
6455
  }
@@ -6527,7 +6545,7 @@ var mParticle = (function () {
6527
6545
  }
6528
6546
  };
6529
6547
 
6530
- this.logProductActionEvent = function (productActionType, product, customAttrs, customFlags, transactionAttributes) {
6548
+ this.logProductActionEvent = function (productActionType, product, customAttrs, customFlags, transactionAttributes, options) {
6531
6549
  var event = mpInstance._Ecommerce.createCommerceEventObject(customFlags);
6532
6550
 
6533
6551
  var productList = Array.isArray(product) ? product : [product];
@@ -6561,7 +6579,7 @@ var mParticle = (function () {
6561
6579
  mpInstance._Ecommerce.convertTransactionAttributesToProductAction(transactionAttributes, event.ProductAction);
6562
6580
  }
6563
6581
 
6564
- self.logCommerceEvent(event, customAttrs);
6582
+ self.logCommerceEvent(event, customAttrs, options);
6565
6583
  }
6566
6584
  };
6567
6585
 
@@ -6604,7 +6622,7 @@ var mParticle = (function () {
6604
6622
  }
6605
6623
  };
6606
6624
 
6607
- this.logPromotionEvent = function (promotionType, promotion, attrs, customFlags) {
6625
+ this.logPromotionEvent = function (promotionType, promotion, attrs, customFlags, eventOptions) {
6608
6626
  var event = mpInstance._Ecommerce.createCommerceEventObject(customFlags);
6609
6627
 
6610
6628
  if (event) {
@@ -6612,13 +6630,13 @@ var mParticle = (function () {
6612
6630
  event.EventCategory = mpInstance._Ecommerce.convertPromotionActionToEventType(promotionType);
6613
6631
  event.PromotionAction = {
6614
6632
  PromotionActionType: promotionType,
6615
- PromotionList: [promotion]
6633
+ PromotionList: Array.isArray(promotion) ? promotion : [promotion]
6616
6634
  };
6617
- self.logCommerceEvent(event, attrs);
6635
+ self.logCommerceEvent(event, attrs, eventOptions);
6618
6636
  }
6619
6637
  };
6620
6638
 
6621
- this.logImpressionEvent = function (impression, attrs, customFlags) {
6639
+ this.logImpressionEvent = function (impression, attrs, customFlags, options) {
6622
6640
  var event = mpInstance._Ecommerce.createCommerceEventObject(customFlags);
6623
6641
 
6624
6642
  if (event) {
@@ -6636,11 +6654,11 @@ var mParticle = (function () {
6636
6654
  ProductList: Array.isArray(impression.Product) ? impression.Product : [impression.Product]
6637
6655
  });
6638
6656
  });
6639
- self.logCommerceEvent(event, attrs);
6657
+ self.logCommerceEvent(event, attrs, options);
6640
6658
  }
6641
6659
  };
6642
6660
 
6643
- this.logCommerceEvent = function (commerceEvent, attrs) {
6661
+ this.logCommerceEvent = function (commerceEvent, attrs, options) {
6644
6662
  mpInstance.Logger.verbose(Messages$6.InformationMessages.StartingLogCommerceEvent);
6645
6663
  attrs = mpInstance._Helpers.sanitizeAttributes(attrs, commerceEvent.EventName);
6646
6664
 
@@ -6654,7 +6672,7 @@ var mParticle = (function () {
6654
6672
  commerceEvent.EventAttributes = attrs;
6655
6673
  }
6656
6674
 
6657
- mpInstance._APIClient.sendEventToServer(commerceEvent);
6675
+ mpInstance._APIClient.sendEventToServer(commerceEvent, options);
6658
6676
 
6659
6677
  mpInstance._Persistence.update();
6660
6678
  } else {
@@ -7644,6 +7662,7 @@ var mParticle = (function () {
7644
7662
 
7645
7663
  if (eventObject.EventDataType === MessageType$1.AppStateTransition) {
7646
7664
  eventObject.IsFirstRun = mpInstance._Store.isFirstRun;
7665
+ eventObject.LaunchReferral = window.location.href || null;
7647
7666
  }
7648
7667
 
7649
7668
  eventObject.CurrencyCode = mpInstance._Store.currencyCode;
@@ -7709,7 +7728,7 @@ var mParticle = (function () {
7709
7728
  dto.fr = event.IsFirstRun;
7710
7729
  dto.iu = false;
7711
7730
  dto.at = ApplicationTransitionType$1.AppInit;
7712
- dto.lr = window.location.href || null;
7731
+ dto.lr = event.LaunchReferral;
7713
7732
  dto.attrs = null;
7714
7733
  }
7715
7734
 
@@ -7951,6 +7970,7 @@ var mParticle = (function () {
7951
7970
  source_mpid: aliasRequest.sourceMpid,
7952
7971
  start_unixtime_ms: aliasRequest.startTime,
7953
7972
  end_unixtime_ms: aliasRequest.endTime,
7973
+ scope: aliasRequest.scope,
7954
7974
  device_application_stamp: mpInstance._Store.deviceId
7955
7975
  }
7956
7976
  };
@@ -10205,10 +10225,14 @@ var mParticle = (function () {
10205
10225
 
10206
10226
 
10207
10227
  this.reset = function (instance) {
10208
- instance._Persistence.resetPersistence();
10228
+ try {
10229
+ instance._Persistence.resetPersistence();
10209
10230
 
10210
- if (instance._Store) {
10211
- delete instance._Store;
10231
+ if (instance._Store) {
10232
+ delete instance._Store;
10233
+ }
10234
+ } catch (error) {
10235
+ console.error('Cannot reset mParticle', error);
10212
10236
  }
10213
10237
  };
10214
10238
 
@@ -10244,7 +10268,7 @@ var mParticle = (function () {
10244
10268
 
10245
10269
 
10246
10270
  this.ready = function (f) {
10247
- if (self._Store.isInitialized && typeof f === 'function') {
10271
+ if (self.isInitialized() && typeof f === 'function') {
10248
10272
  f();
10249
10273
  } else {
10250
10274
  self._preInit.readyQueue.push(f);
@@ -10268,6 +10292,10 @@ var mParticle = (function () {
10268
10292
 
10269
10293
 
10270
10294
  this.setAppVersion = function (version) {
10295
+ var queued = queueIfNotInitialized(function () {
10296
+ self.setAppVersion(version);
10297
+ }, self);
10298
+ if (queued) return;
10271
10299
  self._Store.SDKConfig.appVersion = version;
10272
10300
 
10273
10301
  self._Persistence.update();
@@ -10290,6 +10318,10 @@ var mParticle = (function () {
10290
10318
 
10291
10319
 
10292
10320
  this.setAppName = function (name) {
10321
+ var queued = queueIfNotInitialized(function () {
10322
+ self.setAppName(name);
10323
+ }, self);
10324
+ if (queued) return;
10293
10325
  self._Store.SDKConfig.appName = name;
10294
10326
  };
10295
10327
  /**
@@ -10338,6 +10370,11 @@ var mParticle = (function () {
10338
10370
 
10339
10371
 
10340
10372
  this.setPosition = function (lat, lng) {
10373
+ var queued = queueIfNotInitialized(function () {
10374
+ self.setPosition(lat, lng);
10375
+ }, self);
10376
+ if (queued) return;
10377
+
10341
10378
  self._SessionManager.resetSessionTimer();
10342
10379
 
10343
10380
  if (typeof lat === 'number' && typeof lng === 'number') {
@@ -10371,16 +10408,15 @@ var mParticle = (function () {
10371
10408
  /**
10372
10409
  * Logs a Base Event to mParticle's servers
10373
10410
  * @param {Object} event Base Event Object
10411
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10374
10412
  */
10375
10413
 
10376
10414
 
10377
- this.logBaseEvent = function (event) {
10378
- if (!self._Store.isInitialized) {
10379
- self.ready(function () {
10380
- self.logBaseEvent(event);
10381
- });
10382
- return;
10383
- }
10415
+ this.logBaseEvent = function (event, eventOptions) {
10416
+ var queued = queueIfNotInitialized(function () {
10417
+ self.logBaseEvent(event, eventOptions);
10418
+ }, self);
10419
+ if (queued) return;
10384
10420
 
10385
10421
  self._SessionManager.resetSessionTimer();
10386
10422
 
@@ -10398,7 +10434,7 @@ var mParticle = (function () {
10398
10434
  return;
10399
10435
  }
10400
10436
 
10401
- self._Events.logEvent(event);
10437
+ self._Events.logEvent(event, eventOptions);
10402
10438
  };
10403
10439
  /**
10404
10440
  * Logs an event to mParticle's servers
@@ -10407,16 +10443,15 @@ var mParticle = (function () {
10407
10443
  * @param {Number} [eventType] The eventType as seen [here](http://docs.mparticle.com/developers/sdk/web/event-tracking#event-type)
10408
10444
  * @param {Object} [eventInfo] Attributes for the event
10409
10445
  * @param {Object} [customFlags] Additional customFlags
10446
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10410
10447
  */
10411
10448
 
10412
10449
 
10413
- this.logEvent = function (eventName, eventType, eventInfo, customFlags) {
10414
- if (!self._Store.isInitialized) {
10415
- self.ready(function () {
10416
- self.logEvent(eventName, eventType, eventInfo, customFlags);
10417
- });
10418
- return;
10419
- }
10450
+ this.logEvent = function (eventName, eventType, eventInfo, customFlags, eventOptions) {
10451
+ var queued = queueIfNotInitialized(function () {
10452
+ self.logEvent(eventName, eventType, eventInfo, customFlags, eventOptions);
10453
+ }, self);
10454
+ if (queued) return;
10420
10455
 
10421
10456
  self._SessionManager.resetSessionTimer();
10422
10457
 
@@ -10445,7 +10480,7 @@ var mParticle = (function () {
10445
10480
  data: eventInfo,
10446
10481
  eventType: eventType,
10447
10482
  customFlags: customFlags
10448
- });
10483
+ }, eventOptions);
10449
10484
  };
10450
10485
  /**
10451
10486
  * Used to log custom errors
@@ -10457,12 +10492,10 @@ var mParticle = (function () {
10457
10492
 
10458
10493
 
10459
10494
  this.logError = function (error, attrs) {
10460
- if (!self._Store.isInitialized) {
10461
- self.ready(function () {
10462
- self.logError(error, attrs);
10463
- });
10464
- return;
10465
- }
10495
+ var queued = queueIfNotInitialized(function () {
10496
+ self.logError(error, attrs);
10497
+ }, self);
10498
+ if (queued) return;
10466
10499
 
10467
10500
  self._SessionManager.resetSessionTimer();
10468
10501
 
@@ -10529,16 +10562,15 @@ var mParticle = (function () {
10529
10562
  * @param {String} eventName The name of the event. Defaults to 'PageView'.
10530
10563
  * @param {Object} [attrs] Attributes for the event
10531
10564
  * @param {Object} [customFlags] Custom flags for the event
10565
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10532
10566
  */
10533
10567
 
10534
10568
 
10535
- this.logPageView = function (eventName, attrs, customFlags) {
10536
- if (!self._Store.isInitialized) {
10537
- self.ready(function () {
10538
- self.logPageView(eventName, attrs, customFlags);
10539
- });
10540
- return;
10541
- }
10569
+ this.logPageView = function (eventName, attrs, customFlags, eventOptions) {
10570
+ var queued = queueIfNotInitialized(function () {
10571
+ self.logPageView(eventName, attrs, customFlags, eventOptions);
10572
+ }, self);
10573
+ if (queued) return;
10542
10574
 
10543
10575
  self._SessionManager.resetSessionTimer();
10544
10576
 
@@ -10569,7 +10601,7 @@ var mParticle = (function () {
10569
10601
  data: attrs,
10570
10602
  eventType: Types.EventType.Unknown,
10571
10603
  customFlags: customFlags
10572
- });
10604
+ }, eventOptions);
10573
10605
  };
10574
10606
  /**
10575
10607
  * Forces an upload of the batch
@@ -10706,12 +10738,10 @@ var mParticle = (function () {
10706
10738
  * @param {String} code The currency code
10707
10739
  */
10708
10740
  setCurrencyCode: function setCurrencyCode(code) {
10709
- if (!self._Store.isInitialized) {
10710
- self.ready(function () {
10711
- self.eCommerce.setCurrencyCode(code);
10712
- });
10713
- return;
10714
- }
10741
+ var queued = queueIfNotInitialized(function () {
10742
+ self.eCommerce.setCurrencyCode(code);
10743
+ }, self);
10744
+ if (queued) return;
10715
10745
 
10716
10746
  if (typeof code !== 'string') {
10717
10747
  self.Logger.error('Code must be a string');
@@ -10815,18 +10845,17 @@ var mParticle = (function () {
10815
10845
  * @param {Object} [attrs] attributes related to the product action
10816
10846
  * @param {Object} [customFlags] Custom flags for the event
10817
10847
  * @param {Object} [transactionAttributes] Transaction Attributes for the event
10848
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10818
10849
  */
10819
- logProductAction: function logProductAction(productActionType, product, attrs, customFlags, transactionAttributes) {
10820
- if (!self._Store.isInitialized) {
10821
- self.ready(function () {
10822
- self.eCommerce.logProductAction(productActionType, product, attrs, customFlags, transactionAttributes);
10823
- });
10824
- return;
10825
- }
10850
+ logProductAction: function logProductAction(productActionType, product, attrs, customFlags, transactionAttributes, eventOptions) {
10851
+ var queued = queueIfNotInitialized(function () {
10852
+ self.eCommerce.logProductAction(productActionType, product, attrs, customFlags, transactionAttributes, eventOptions);
10853
+ }, self);
10854
+ if (queued) return;
10826
10855
 
10827
10856
  self._SessionManager.resetSessionTimer();
10828
10857
 
10829
- self._Events.logProductActionEvent(productActionType, product, attrs, customFlags, transactionAttributes);
10858
+ self._Events.logProductActionEvent(productActionType, product, attrs, customFlags, transactionAttributes, eventOptions);
10830
10859
  },
10831
10860
 
10832
10861
  /**
@@ -10868,18 +10897,17 @@ var mParticle = (function () {
10868
10897
  * @param {Object} promotion promotion object
10869
10898
  * @param {Object} [attrs] boolean to clear the cart after logging or not
10870
10899
  * @param {Object} [customFlags] Custom flags for the event
10900
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10871
10901
  */
10872
- logPromotion: function logPromotion(type, promotion, attrs, customFlags) {
10873
- if (!self._Store.isInitialized) {
10874
- self.ready(function () {
10875
- self.eCommerce.logPromotion(type, promotion, attrs, customFlags);
10876
- });
10877
- return;
10878
- }
10902
+ logPromotion: function logPromotion(type, promotion, attrs, customFlags, eventOptions) {
10903
+ var queued = queueIfNotInitialized(function () {
10904
+ self.eCommerce.logPromotion(type, promotion, attrs, customFlags, eventOptions);
10905
+ }, self);
10906
+ if (queued) return;
10879
10907
 
10880
10908
  self._SessionManager.resetSessionTimer();
10881
10909
 
10882
- self._Events.logPromotionEvent(type, promotion, attrs, customFlags);
10910
+ self._Events.logPromotionEvent(type, promotion, attrs, customFlags, eventOptions);
10883
10911
  },
10884
10912
 
10885
10913
  /**
@@ -10889,18 +10917,17 @@ var mParticle = (function () {
10889
10917
  * @param {Object} impression product impression object
10890
10918
  * @param {Object} attrs attributes related to the impression log
10891
10919
  * @param {Object} [customFlags] Custom flags for the event
10920
+ * @param {Object} [eventOptions] For Event-level Configuration Options
10892
10921
  */
10893
- logImpression: function logImpression(impression, attrs, customFlags) {
10894
- if (!self._Store.isInitialized) {
10895
- self.ready(function () {
10896
- self.eCommerce.logImpression(impression, attrs, customFlags);
10897
- });
10898
- return;
10899
- }
10922
+ logImpression: function logImpression(impression, attrs, customFlags, eventOptions) {
10923
+ var queued = queueIfNotInitialized(function () {
10924
+ self.eCommerce.logImpression(impression, attrs, customFlags, eventOptions);
10925
+ }, self);
10926
+ if (queued) return;
10900
10927
 
10901
10928
  self._SessionManager.resetSessionTimer();
10902
10929
 
10903
- self._Events.logImpressionEvent(impression, attrs, customFlags);
10930
+ self._Events.logImpressionEvent(impression, attrs, customFlags, eventOptions);
10904
10931
  },
10905
10932
 
10906
10933
  /**
@@ -10940,16 +10967,13 @@ var mParticle = (function () {
10940
10967
  */
10941
10968
 
10942
10969
  this.setSessionAttribute = function (key, value) {
10943
- if (!self._Store.isInitialized) {
10944
- self.ready(function () {
10945
- self.setSessionAttribute(key, value);
10946
- });
10947
- return;
10948
- } // Logs to cookie
10970
+ var queued = queueIfNotInitialized(function () {
10971
+ self.setSessionAttribute(key, value);
10972
+ }, self);
10973
+ if (queued) return; // Logs to cookie
10949
10974
  // And logs to in-memory object
10950
10975
  // Example: mParticle.setSessionAttribute('location', '33431');
10951
10976
 
10952
-
10953
10977
  if (self._Helpers.canLog()) {
10954
10978
  if (!self._Helpers.Validators.isValidAttributeValue(value)) {
10955
10979
  self.Logger.error(Messages$9.ErrorMessages.BadAttribute);
@@ -10989,12 +11013,10 @@ var mParticle = (function () {
10989
11013
 
10990
11014
 
10991
11015
  this.setOptOut = function (isOptingOut) {
10992
- if (!self._Store.isInitialized) {
10993
- self.ready(function () {
10994
- self.setOptOut(isOptingOut);
10995
- });
10996
- return;
10997
- }
11016
+ var queued = queueIfNotInitialized(function () {
11017
+ self.setOptOut(isOptingOut);
11018
+ }, self);
11019
+ if (queued) return;
10998
11020
 
10999
11021
  self._SessionManager.resetSessionTimer();
11000
11022
 
@@ -11032,12 +11054,10 @@ var mParticle = (function () {
11032
11054
 
11033
11055
 
11034
11056
  this.setIntegrationAttribute = function (integrationId, attrs) {
11035
- if (!self._Store.isInitialized) {
11036
- self.ready(function () {
11037
- self.setIntegrationAttribute(integrationId, attrs);
11038
- });
11039
- return;
11040
- }
11057
+ var queued = queueIfNotInitialized(function () {
11058
+ self.setIntegrationAttribute(integrationId, attrs);
11059
+ }, self);
11060
+ if (queued) return;
11041
11061
 
11042
11062
  if (typeof integrationId !== 'number') {
11043
11063
  self.Logger.error('integrationId must be a number');
@@ -11112,6 +11132,10 @@ var mParticle = (function () {
11112
11132
  this._setIntegrationDelay = function (module, _boolean) {
11113
11133
  self._preInit.integrationDelays[module] = _boolean;
11114
11134
  };
11135
+
11136
+ this.isInitialized = function () {
11137
+ return self._Store ? self._Store.isInitialized : false;
11138
+ };
11115
11139
  } // Some (server) config settings need to be returned before they are set on SDKConfig in a self hosted environment
11116
11140
 
11117
11141
  function completeSDKInitialization(apiKey, config, mpInstance) {
@@ -11292,15 +11316,15 @@ var mParticle = (function () {
11292
11316
  }
11293
11317
  } // config.dataPlanResult returns on /config endpoint
11294
11318
  else if (config.dataPlanResult) {
11295
- if (config.dataPlanResult.error_message) {
11296
- kitBlockError = config.dataPlanResult.error_message;
11297
- } else {
11298
- mpInstance.Logger.verbose('Data plan found from /config');
11299
- dataPlanForKitBlocker = {
11300
- document: config.dataPlanResult
11301
- };
11302
- }
11319
+ if (config.dataPlanResult.error_message) {
11320
+ kitBlockError = config.dataPlanResult.error_message;
11321
+ } else {
11322
+ mpInstance.Logger.verbose('Data plan found from /config');
11323
+ dataPlanForKitBlocker = {
11324
+ document: config.dataPlanResult
11325
+ };
11303
11326
  }
11327
+ }
11304
11328
  }
11305
11329
 
11306
11330
  if (kitBlockError) {
@@ -11353,6 +11377,17 @@ var mParticle = (function () {
11353
11377
  }
11354
11378
  }
11355
11379
 
11380
+ function queueIfNotInitialized(func, self) {
11381
+ if (!self.isInitialized()) {
11382
+ self.ready(function () {
11383
+ func();
11384
+ });
11385
+ return true;
11386
+ }
11387
+
11388
+ return false;
11389
+ }
11390
+
11356
11391
  var _BatchValidator = /*#__PURE__*/ function () {
11357
11392
  function _BatchValidator() {
11358
11393
  classCallCheck(this, _BatchValidator);
@@ -11538,12 +11573,12 @@ var mParticle = (function () {
11538
11573
  self.getInstance().endSession();
11539
11574
  };
11540
11575
 
11541
- this.logBaseEvent = function (event) {
11542
- self.getInstance().logBaseEvent(event);
11576
+ this.logBaseEvent = function (event, eventOptions) {
11577
+ self.getInstance().logBaseEvent(event, eventOptions);
11543
11578
  };
11544
11579
 
11545
- this.logEvent = function (eventName, eventType, eventInfo, customFlags) {
11546
- self.getInstance().logEvent(eventName, eventType, eventInfo, customFlags);
11580
+ this.logEvent = function (eventName, eventType, eventInfo, customFlags, eventOptions) {
11581
+ self.getInstance().logEvent(eventName, eventType, eventInfo, customFlags, eventOptions);
11547
11582
  };
11548
11583
 
11549
11584
  this.logError = function (error, attrs) {
@@ -11558,8 +11593,8 @@ var mParticle = (function () {
11558
11593
  self.getInstance().logForm(selector, eventName, eventType, eventInfo);
11559
11594
  };
11560
11595
 
11561
- this.logPageView = function (eventName, attrs, customFlags) {
11562
- self.getInstance().logPageView(eventName, attrs, customFlags);
11596
+ this.logPageView = function (eventName, attrs, customFlags, eventOptions) {
11597
+ self.getInstance().logPageView(eventName, attrs, customFlags, eventOptions);
11563
11598
  };
11564
11599
 
11565
11600
  this.upload = function () {
@@ -11596,17 +11631,17 @@ var mParticle = (function () {
11596
11631
  logCheckout: function logCheckout(step, options, attrs, customFlags) {
11597
11632
  self.getInstance().eCommerce.logCheckout(step, options, attrs, customFlags);
11598
11633
  },
11599
- logProductAction: function logProductAction(productActionType, product, attrs, customFlags, transactionAttributes) {
11600
- self.getInstance().eCommerce.logProductAction(productActionType, product, attrs, customFlags, transactionAttributes);
11634
+ logProductAction: function logProductAction(productActionType, product, attrs, customFlags, transactionAttributes, eventOptions) {
11635
+ self.getInstance().eCommerce.logProductAction(productActionType, product, attrs, customFlags, transactionAttributes, eventOptions);
11601
11636
  },
11602
11637
  logPurchase: function logPurchase(transactionAttributes, product, clearCart, attrs, customFlags) {
11603
11638
  self.getInstance().eCommerce.logPurchase(transactionAttributes, product, clearCart, attrs, customFlags);
11604
11639
  },
11605
- logPromotion: function logPromotion(type, promotion, attrs, customFlags) {
11606
- self.getInstance().eCommerce.logPromotion(type, promotion, attrs, customFlags);
11640
+ logPromotion: function logPromotion(type, promotion, attrs, customFlags, eventOptions) {
11641
+ self.getInstance().eCommerce.logPromotion(type, promotion, attrs, customFlags, eventOptions);
11607
11642
  },
11608
- logImpression: function logImpression(impression, attrs, customFlags) {
11609
- self.getInstance().eCommerce.logImpression(impression, attrs, customFlags);
11643
+ logImpression: function logImpression(impression, attrs, customFlags, eventOptions) {
11644
+ self.getInstance().eCommerce.logImpression(impression, attrs, customFlags, eventOptions);
11610
11645
  },
11611
11646
  logRefund: function logRefund(transactionAttributes, product, clearCart, attrs, customFlags) {
11612
11647
  self.getInstance().eCommerce.logRefund(transactionAttributes, product, clearCart, attrs, customFlags);