@sitecore-content-sdk/events 2.1.0-canary.5 → 2.1.0-canary.7
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/dist/cjs/package.json +4 -4
- package/dist/cjs/src/events/page-view/bot-page-view.js +4 -1
- package/dist/esm/package.json +4 -4
- package/dist/esm/src/events/page-view/bot-page-view.js +4 -1
- package/package.json +4 -4
- package/types/src/events/page-view/bot-page-view.d.ts +5 -1
- package/types/src/events/page-view/bot-page-view.d.ts.map +1 -1
package/dist/cjs/package.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"url": "https://github.com/Sitecore/content-sdk/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.
|
|
11
|
-
"@sitecore-content-sdk/core": "2.1.0-canary.
|
|
10
|
+
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.7",
|
|
11
|
+
"@sitecore-content-sdk/core": "2.1.0-canary.7",
|
|
12
12
|
"debug": "^4.4.3",
|
|
13
13
|
"isbot": "^5.1.36"
|
|
14
14
|
},
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"api-extractor": "npm run build && api-extractor run --local --verbose",
|
|
77
77
|
"api-extractor:verify": "api-extractor run"
|
|
78
78
|
},
|
|
79
|
-
"version": "2.1.0-canary.
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"version": "2.1.0-canary.7",
|
|
80
|
+
"gitHead": "bb6498faad659ee6966f24e67d9068e8dc5e94bc"
|
|
81
81
|
}
|
|
@@ -11,7 +11,7 @@ const bot_detection_1 = require("./bot-detection");
|
|
|
11
11
|
* Sends a VIEW event for server-side bot tracking (e.g. Next.js proxy / Edge).
|
|
12
12
|
* Uses a synthetic per-invocation client id and defaults `channel` to `bot`.
|
|
13
13
|
* Returns `null` in browser environments.
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {BotPageViewData} [pageViewData] - The optional attributes to be sent to the SitecoreCloud API
|
|
15
15
|
* @returns The response from Sitecore Edge Proxy, or `null` if skipped (browser).
|
|
16
16
|
* @public
|
|
17
17
|
*/
|
|
@@ -30,6 +30,9 @@ async function botPageView(pageViewData) {
|
|
|
30
30
|
channel: bot_detection_1.BOT_CHANNEL,
|
|
31
31
|
page: pageViewData.page,
|
|
32
32
|
language: pageViewData.language,
|
|
33
|
+
extensionData: {
|
|
34
|
+
sourceUserAgent: pageViewData.userAgent,
|
|
35
|
+
},
|
|
33
36
|
},
|
|
34
37
|
searchParams: adapter.location.getSearchParams(),
|
|
35
38
|
sendEvent: sendEvent_1.sendEvent,
|
package/dist/esm/package.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"url": "https://github.com/Sitecore/content-sdk/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.
|
|
11
|
-
"@sitecore-content-sdk/core": "2.1.0-canary.
|
|
10
|
+
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.7",
|
|
11
|
+
"@sitecore-content-sdk/core": "2.1.0-canary.7",
|
|
12
12
|
"debug": "^4.4.3",
|
|
13
13
|
"isbot": "^5.1.36"
|
|
14
14
|
},
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"api-extractor": "npm run build && api-extractor run --local --verbose",
|
|
77
77
|
"api-extractor:verify": "api-extractor run"
|
|
78
78
|
},
|
|
79
|
-
"version": "2.1.0-canary.
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"version": "2.1.0-canary.7",
|
|
80
|
+
"gitHead": "bb6498faad659ee6966f24e67d9068e8dc5e94bc"
|
|
81
81
|
}
|
|
@@ -8,7 +8,7 @@ import { BOT_CHANNEL, isBrowserEnvironment } from './bot-detection';
|
|
|
8
8
|
* Sends a VIEW event for server-side bot tracking (e.g. Next.js proxy / Edge).
|
|
9
9
|
* Uses a synthetic per-invocation client id and defaults `channel` to `bot`.
|
|
10
10
|
* Returns `null` in browser environments.
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {BotPageViewData} [pageViewData] - The optional attributes to be sent to the SitecoreCloud API
|
|
12
12
|
* @returns The response from Sitecore Edge Proxy, or `null` if skipped (browser).
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
@@ -27,6 +27,9 @@ export async function botPageView(pageViewData) {
|
|
|
27
27
|
channel: BOT_CHANNEL,
|
|
28
28
|
page: pageViewData.page,
|
|
29
29
|
language: pageViewData.language,
|
|
30
|
+
extensionData: {
|
|
31
|
+
sourceUserAgent: pageViewData.userAgent,
|
|
32
|
+
},
|
|
30
33
|
},
|
|
31
34
|
searchParams: adapter.location.getSearchParams(),
|
|
32
35
|
sendEvent,
|
package/package.json
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
"url": "https://github.com/Sitecore/content-sdk/issues"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.
|
|
11
|
-
"@sitecore-content-sdk/core": "2.1.0-canary.
|
|
10
|
+
"@sitecore-content-sdk/analytics-core": "2.1.0-canary.7",
|
|
11
|
+
"@sitecore-content-sdk/core": "2.1.0-canary.7",
|
|
12
12
|
"debug": "^4.4.3",
|
|
13
13
|
"isbot": "^5.1.36"
|
|
14
14
|
},
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"api-extractor": "npm run build && api-extractor run --local --verbose",
|
|
77
77
|
"api-extractor:verify": "api-extractor run"
|
|
78
78
|
},
|
|
79
|
-
"version": "2.1.0-canary.
|
|
80
|
-
"gitHead": "
|
|
79
|
+
"version": "2.1.0-canary.7",
|
|
80
|
+
"gitHead": "bb6498faad659ee6966f24e67d9068e8dc5e94bc"
|
|
81
81
|
}
|
|
@@ -14,12 +14,16 @@ export type BotPageViewData = {
|
|
|
14
14
|
* Format: uppercase ISO 639.
|
|
15
15
|
*/
|
|
16
16
|
language: string;
|
|
17
|
+
/**
|
|
18
|
+
* Full `User-Agent` of the request. Sent in event `ext` as `sourceUserAgent` (distinct from any `User-Agent` header on the HTTP request).
|
|
19
|
+
*/
|
|
20
|
+
userAgent: string;
|
|
17
21
|
};
|
|
18
22
|
/**
|
|
19
23
|
* Sends a VIEW event for server-side bot tracking (e.g. Next.js proxy / Edge).
|
|
20
24
|
* Uses a synthetic per-invocation client id and defaults `channel` to `bot`.
|
|
21
25
|
* Returns `null` in browser environments.
|
|
22
|
-
* @param {
|
|
26
|
+
* @param {BotPageViewData} [pageViewData] - The optional attributes to be sent to the SitecoreCloud API
|
|
23
27
|
* @returns The response from Sitecore Edge Proxy, or `null` if skipped (browser).
|
|
24
28
|
* @public
|
|
25
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bot-page-view.d.ts","sourceRoot":"","sources":["../../../../src/events/page-view/bot-page-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAOpG;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"bot-page-view.d.ts","sourceRoot":"","sources":["../../../../src/events/page-view/bot-page-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,UAAU,EAAE,MAAM,+CAA+C,CAAC;AAOpG;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,YAAY,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA0B3F"}
|