@adobe/alloy 2.21.0-beta.11 → 2.21.0-beta.12

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.
@@ -33,7 +33,7 @@ var buildDataFromClickedElementProperties = function buildDataFromClickedElement
33
33
  return {
34
34
  __adobe: {
35
35
  analytics: {
36
- c: {
36
+ contextData: {
37
37
  a: {
38
38
  activitymap: {
39
39
  page: props.pageName,
@@ -66,14 +66,14 @@ var populateClickedElementPropertiesFromOptions = function populateClickedElemen
66
66
  // DATA has priority over XDM
67
67
  /* eslint no-underscore-dangle: 0 */
68
68
  if (data && data.__adobe && data.__adobe.analytics) {
69
- var c = data.__adobe.analytics.c;
70
- if (c && c.a && c.a.activitymap) {
69
+ var contextData = data.__adobe.analytics.contextData;
70
+ if (contextData && contextData.a && contextData.a.activitymap) {
71
71
  // Set the properties if they exists
72
- var _c$a$activitymap = c.a.activitymap,
73
- page = _c$a$activitymap.page,
74
- link = _c$a$activitymap.link,
75
- _region = _c$a$activitymap.region,
76
- pageIDType = _c$a$activitymap.pageIDType;
72
+ var _contextData$a$activi = contextData.a.activitymap,
73
+ page = _contextData$a$activi.page,
74
+ link = _contextData$a$activi.link,
75
+ _region = _contextData$a$activi.region,
76
+ pageIDType = _contextData$a$activi.pageIDType;
77
77
  props.pageName = page || props.pageName;
78
78
  props.linkName = link || props.linkName;
79
79
  props.linkRegion = _region || props.linkRegion;
@@ -58,7 +58,7 @@ var _default = exports.default = function _default(_ref) {
58
58
  } else if (elementProperties.isValidLink()) {
59
59
  // Event will be sent
60
60
  event.mergeXdm(elementProperties.xdm);
61
- event.setUserData(elementProperties.data);
61
+ event.mergeData(elementProperties.data);
62
62
  clickActivityStorage.save({
63
63
  pageName: elementProperties.pageName,
64
64
  pageIDType: elementProperties.pageIDType
@@ -33,7 +33,7 @@ var _default = exports.default = function _default(_ref) {
33
33
  event.mergeXdm(xdm);
34
34
  }
35
35
  if (elementProperties.isValidActivityMapData()) {
36
- event.setUserData(elementProperties.data);
36
+ event.mergeData(elementProperties.data);
37
37
  }
38
38
  // NOTE: We can't clear out all the storage here because we might still need to
39
39
  // keep a page-name for multiple link-clicks (e.g. downloads) on the same page.
@@ -14,4 +14,4 @@ governing permissions and limitations under the License.
14
14
  */
15
15
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
16
16
  // see babel-plugin-version
17
- var _default = exports.default = "2.21.0-beta.11";
17
+ var _default = exports.default = "2.21.0-beta.12";
@@ -30,7 +30,7 @@ const buildDataFromClickedElementProperties = props => {
30
30
  return {
31
31
  __adobe: {
32
32
  analytics: {
33
- c: {
33
+ contextData: {
34
34
  a: {
35
35
  activitymap: {
36
36
  page: props.pageName,
@@ -67,16 +67,16 @@ const populateClickedElementPropertiesFromOptions = (options, props) => {
67
67
  /* eslint no-underscore-dangle: 0 */
68
68
  if (data && data.__adobe && data.__adobe.analytics) {
69
69
  const {
70
- c
70
+ contextData
71
71
  } = data.__adobe.analytics;
72
- if (c && c.a && c.a.activitymap) {
72
+ if (contextData && contextData.a && contextData.a.activitymap) {
73
73
  // Set the properties if they exists
74
74
  const {
75
75
  page,
76
76
  link,
77
77
  region,
78
78
  pageIDType
79
- } = c.a.activitymap;
79
+ } = contextData.a.activitymap;
80
80
  props.pageName = page || props.pageName;
81
81
  props.linkName = link || props.linkName;
82
82
  props.linkRegion = region || props.linkRegion;
@@ -57,7 +57,7 @@ export default (({
57
57
  } else if (elementProperties.isValidLink()) {
58
58
  // Event will be sent
59
59
  event.mergeXdm(elementProperties.xdm);
60
- event.setUserData(elementProperties.data);
60
+ event.mergeData(elementProperties.data);
61
61
  clickActivityStorage.save({
62
62
  pageName: elementProperties.pageName,
63
63
  pageIDType: elementProperties.pageIDType
@@ -32,7 +32,7 @@ export default (({
32
32
  event.mergeXdm(xdm);
33
33
  }
34
34
  if (elementProperties.isValidActivityMapData()) {
35
- event.setUserData(elementProperties.data);
35
+ event.mergeData(elementProperties.data);
36
36
  }
37
37
  // NOTE: We can't clear out all the storage here because we might still need to
38
38
  // keep a page-name for multiple link-clicks (e.g. downloads) on the same page.
@@ -13,4 +13,4 @@ governing permissions and limitations under the License.
13
13
  // The __VERSION__ keyword will be replace at alloy build time with the package.json version.
14
14
  // see babel-plugin-version
15
15
 
16
- export default "2.21.0-beta.11";
16
+ export default "2.21.0-beta.12";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/alloy",
3
- "version": "2.21.0-beta.11",
3
+ "version": "2.21.0-beta.12",
4
4
  "description": "Adobe Experience Platform Web SDK",
5
5
  "type": "module",
6
6
  "main": "libEs5/index.js",
@@ -98,7 +98,7 @@
98
98
  "uuid": "^10.0.0"
99
99
  },
100
100
  "devDependencies": {
101
- "@adobe/alloy": "^2.21.0-beta.10",
101
+ "@adobe/alloy": "^2.21.0-beta.11",
102
102
  "@babel/cli": "^7.24.7",
103
103
  "@babel/plugin-transform-runtime": "^7.24.7",
104
104
  "@eslint/js": "^9.5.0",