@surfside/surfside-events 3.6.2 → 3.6.4

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,5 +1,5 @@
1
1
  /*!
2
- * Surfside Digital Analytics > Custom Events v3.6.2 (https://surfside.io)
2
+ * Surfside Digital Analytics > Custom Events v3.6.4 (https://surfside.io)
3
3
  * Copyright 2022 Surfside Solutions Inc, Snowplow Analytics Ltd, 2010 Anthon Pang
4
4
  */
5
5
 
@@ -59,11 +59,12 @@ function setCommerceAction(event, trackers) {
59
59
  dispatchToTrackersInCollection(trackers, _trackers, function (t) {
60
60
  var combinedContexts = _context[t.id].concat(event.context || []);
61
61
  _context[t.id].length = 0;
62
+ var action = (event === null || event === void 0 ? void 0 : event.action) ? event.action : event;
62
63
  t.core.track(buildSelfDescribingEvent({
63
64
  event: {
64
65
  schema: 'iglu:io.surfside.commerce/action/jsonschema/1-0-0',
65
66
  data: {
66
- action: event
67
+ action: action
67
68
  }
68
69
  }
69
70
  }), combinedContexts, event.timestamp);
@@ -448,7 +449,7 @@ function setSurfId(context, trackers) {
448
449
  _context[t.id].length = 0;
449
450
  t.core.addGlobalContexts([
450
451
  {
451
- schema: 'iglu:io.surfside/uid_context/jsonschema/1-0-0',
452
+ schema: 'iglu:io.surfside.identity/uid_context/jsonschema/1-0-0',
452
453
  data: {
453
454
  uid2: token
454
455
  }