@adobe/alloy 2.31.1-beta.1 → 2.31.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/libEs5/components/Advertising/handlers/clickThroughHandler.js +9 -11
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs6/components/Advertising/handlers/clickThroughHandler.js +9 -11
- package/libEs6/constants/libraryVersion.js +1 -1
- package/package.json +1 -1
- package/types/components/Advertising/handlers/clickThroughHandler.d.ts +5 -5
- package/types/components/Advertising/handlers/clickThroughHandler.d.ts.map +1 -1
|
@@ -21,8 +21,8 @@ governing permissions and limitations under the License.
|
|
|
21
21
|
* @param {Object} params.cookieManager - Session manager for cookie operations
|
|
22
22
|
* @param {Object} params.adConversionHandler - Handler for sending ad conversion events
|
|
23
23
|
* @param {Object} params.logger - Logger instance
|
|
24
|
-
* @param {string} params.skwcid - Search keyword click ID
|
|
25
|
-
* @param {string} params.efid - EF ID parameter
|
|
24
|
+
* @param {string | string[]} params.skwcid - Search keyword click ID
|
|
25
|
+
* @param {string | string[]} params.efid - EF ID parameter
|
|
26
26
|
* @param {Object} params.optionsFromCommand - Additional options from command
|
|
27
27
|
* @returns {Promise} Result of the ad conversion tracking
|
|
28
28
|
*/
|
|
@@ -31,23 +31,21 @@ async function handleClickThrough({
|
|
|
31
31
|
cookieManager,
|
|
32
32
|
adConversionHandler,
|
|
33
33
|
logger,
|
|
34
|
-
skwcid,
|
|
35
|
-
efid
|
|
34
|
+
skwcid: rawSkwcid,
|
|
35
|
+
efid: rawEfId
|
|
36
36
|
}) {
|
|
37
|
+
const skwcid = Array.isArray(rawSkwcid) ? rawSkwcid[0] : rawSkwcid;
|
|
38
|
+
const efid = Array.isArray(rawEfId) ? rawEfId[0] : rawEfId;
|
|
37
39
|
logger.info(_index.LOG_AD_CONVERSION_START, {
|
|
38
|
-
skwcid,
|
|
40
|
+
skwcid: skwcid,
|
|
39
41
|
efid
|
|
40
42
|
});
|
|
41
43
|
const event = eventManager.createEvent();
|
|
42
44
|
if (typeof skwcid !== "undefined" && typeof efid !== "undefined" && skwcid.startsWith("AL!")) {
|
|
43
45
|
const clickData = {
|
|
44
46
|
click_time: Date.now(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}),
|
|
48
|
-
...(typeof efid !== "undefined" && {
|
|
49
|
-
efid
|
|
50
|
-
})
|
|
47
|
+
skwcid,
|
|
48
|
+
efid
|
|
51
49
|
};
|
|
52
50
|
cookieManager.setValue(_index.LAST_CLICK_COOKIE_KEY, clickData);
|
|
53
51
|
}
|
|
@@ -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.31.1
|
|
17
|
+
var _default = exports.default = "2.31.1";
|
|
@@ -19,8 +19,8 @@ import { LAST_CLICK_COOKIE_KEY, LAST_CONVERSION_TIME_KEY, LOG_AD_CONVERSION_STAR
|
|
|
19
19
|
* @param {Object} params.cookieManager - Session manager for cookie operations
|
|
20
20
|
* @param {Object} params.adConversionHandler - Handler for sending ad conversion events
|
|
21
21
|
* @param {Object} params.logger - Logger instance
|
|
22
|
-
* @param {string} params.skwcid - Search keyword click ID
|
|
23
|
-
* @param {string} params.efid - EF ID parameter
|
|
22
|
+
* @param {string | string[]} params.skwcid - Search keyword click ID
|
|
23
|
+
* @param {string | string[]} params.efid - EF ID parameter
|
|
24
24
|
* @param {Object} params.optionsFromCommand - Additional options from command
|
|
25
25
|
* @returns {Promise} Result of the ad conversion tracking
|
|
26
26
|
*/
|
|
@@ -29,23 +29,21 @@ export default async function handleClickThrough({
|
|
|
29
29
|
cookieManager,
|
|
30
30
|
adConversionHandler,
|
|
31
31
|
logger,
|
|
32
|
-
skwcid,
|
|
33
|
-
efid
|
|
32
|
+
skwcid: rawSkwcid,
|
|
33
|
+
efid: rawEfId
|
|
34
34
|
}) {
|
|
35
|
+
const skwcid = Array.isArray(rawSkwcid) ? rawSkwcid[0] : rawSkwcid;
|
|
36
|
+
const efid = Array.isArray(rawEfId) ? rawEfId[0] : rawEfId;
|
|
35
37
|
logger.info(LOG_AD_CONVERSION_START, {
|
|
36
|
-
skwcid,
|
|
38
|
+
skwcid: skwcid,
|
|
37
39
|
efid
|
|
38
40
|
});
|
|
39
41
|
const event = eventManager.createEvent();
|
|
40
42
|
if (typeof skwcid !== "undefined" && typeof efid !== "undefined" && skwcid.startsWith("AL!")) {
|
|
41
43
|
const clickData = {
|
|
42
44
|
click_time: Date.now(),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}),
|
|
46
|
-
...(typeof efid !== "undefined" && {
|
|
47
|
-
efid
|
|
48
|
-
})
|
|
45
|
+
skwcid,
|
|
46
|
+
efid
|
|
49
47
|
};
|
|
50
48
|
cookieManager.setValue(LAST_CLICK_COOKIE_KEY, clickData);
|
|
51
49
|
}
|
package/package.json
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* @param {Object} params.cookieManager - Session manager for cookie operations
|
|
6
6
|
* @param {Object} params.adConversionHandler - Handler for sending ad conversion events
|
|
7
7
|
* @param {Object} params.logger - Logger instance
|
|
8
|
-
* @param {string} params.skwcid - Search keyword click ID
|
|
9
|
-
* @param {string} params.efid - EF ID parameter
|
|
8
|
+
* @param {string | string[]} params.skwcid - Search keyword click ID
|
|
9
|
+
* @param {string | string[]} params.efid - EF ID parameter
|
|
10
10
|
* @param {Object} params.optionsFromCommand - Additional options from command
|
|
11
11
|
* @returns {Promise} Result of the ad conversion tracking
|
|
12
12
|
*/
|
|
13
|
-
export default function handleClickThrough({ eventManager, cookieManager, adConversionHandler, logger, skwcid, efid, }: {
|
|
13
|
+
export default function handleClickThrough({ eventManager, cookieManager, adConversionHandler, logger, skwcid: rawSkwcid, efid: rawEfId, }: {
|
|
14
14
|
eventManager: any;
|
|
15
15
|
cookieManager: any;
|
|
16
16
|
adConversionHandler: any;
|
|
17
17
|
logger: any;
|
|
18
|
-
skwcid: string;
|
|
19
|
-
efid: string;
|
|
18
|
+
skwcid: string | string[];
|
|
19
|
+
efid: string | string[];
|
|
20
20
|
optionsFromCommand: any;
|
|
21
21
|
}): Promise<any>;
|
|
22
22
|
//# sourceMappingURL=clickThroughHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clickThroughHandler.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/components/Advertising/handlers/clickThroughHandler.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AACH,
|
|
1
|
+
{"version":3,"file":"clickThroughHandler.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/components/Advertising/handlers/clickThroughHandler.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;GAWG;AACH,4IATG;IAAuB,YAAY;IACZ,aAAa;IACb,mBAAmB;IACnB,MAAM;IACK,MAAM,EAAhC,MAAM,GAAG,MAAM,EAAE;IACS,IAAI,EAA9B,MAAM,GAAG,MAAM,EAAE;IACF,kBAAkB;CACzC,gBA4DF"}
|