@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.
- package/libEs5/components/ActivityCollector/createClickedElementProperties.js +8 -8
- package/libEs5/components/ActivityCollector/createInjectClickedElementProperties.js +1 -1
- package/libEs5/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js +1 -1
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs6/components/ActivityCollector/createClickedElementProperties.js +4 -4
- package/libEs6/components/ActivityCollector/createInjectClickedElementProperties.js +1 -1
- package/libEs6/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js +1 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/package.json +2 -2
|
@@ -33,7 +33,7 @@ var buildDataFromClickedElementProperties = function buildDataFromClickedElement
|
|
|
33
33
|
return {
|
|
34
34
|
__adobe: {
|
|
35
35
|
analytics: {
|
|
36
|
-
|
|
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
|
|
70
|
-
if (
|
|
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
|
|
73
|
-
page =
|
|
74
|
-
link =
|
|
75
|
-
_region =
|
|
76
|
-
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.
|
|
61
|
+
event.mergeData(elementProperties.data);
|
|
62
62
|
clickActivityStorage.save({
|
|
63
63
|
pageName: elementProperties.pageName,
|
|
64
64
|
pageIDType: elementProperties.pageIDType
|
package/libEs5/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
70
|
+
contextData
|
|
71
71
|
} = data.__adobe.analytics;
|
|
72
|
-
if (
|
|
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
|
-
} =
|
|
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.
|
|
60
|
+
event.mergeData(elementProperties.data);
|
|
61
61
|
clickActivityStorage.save({
|
|
62
62
|
pageName: elementProperties.pageName,
|
|
63
63
|
pageIDType: elementProperties.pageIDType
|
package/libEs6/components/ActivityCollector/createRecallAndInjectClickedElementProperties.js
CHANGED
|
@@ -32,7 +32,7 @@ export default (({
|
|
|
32
32
|
event.mergeXdm(xdm);
|
|
33
33
|
}
|
|
34
34
|
if (elementProperties.isValidActivityMapData()) {
|
|
35
|
-
event.
|
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.21.0-beta.
|
|
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.
|
|
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",
|