@builder.io/sdk 6.2.0 → 6.2.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @builder.io/sdk
2
2
 
3
+ ## 6.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fffde77: fix trackConversion method for sdks
8
+
3
9
  ## 6.2.0
4
10
 
5
11
  ### Minor Changes
@@ -1052,7 +1052,7 @@
1052
1052
 
1053
1053
  var DEFAULT_API_VERSION = 'v3';
1054
1054
 
1055
- var SDK_VERSION = '6.2.0';
1055
+ var SDK_VERSION = '6.2.1';
1056
1056
 
1057
1057
  function datePlusMinutes(minutes) {
1058
1058
  if (minutes === void 0) { minutes = 30; }
@@ -1804,7 +1804,15 @@
1804
1804
  if (isIframe || !isBrowser || Builder.isPreviewing) {
1805
1805
  return;
1806
1806
  }
1807
- var meta = typeof contentId === 'object' ? contentId : customProperties;
1807
+ var metadata = typeof contentId === 'object'
1808
+ ? __assign({}, contentId) : customProperties && typeof customProperties === 'object'
1809
+ ? __assign({}, customProperties) : undefined;
1810
+ if (amount !== undefined) {
1811
+ if (!metadata) {
1812
+ metadata = {};
1813
+ }
1814
+ metadata.amount = amount;
1815
+ }
1808
1816
  var useContentId = typeof contentId === 'string' ? contentId : undefined;
1809
1817
  if (!useContentId && !contentId && this.contentId) {
1810
1818
  useContentId = this.contentId;
@@ -1818,7 +1826,7 @@
1818
1826
  variationId: useVariationId && useContentId && useVariationId !== useContentId
1819
1827
  ? useVariationId
1820
1828
  : undefined,
1821
- meta: meta,
1829
+ meta: metadata,
1822
1830
  contentId: useContentId,
1823
1831
  }, context);
1824
1832
  };