coveo.analytics 2.26.2 → 2.26.3
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/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +2 -2
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/react-native/index.d.ts +1 -0
- package/dist/definitions/src/react-native/index.d.ts +1 -0
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.es.js +2 -2
- package/dist/library.js +2 -2
- package/dist/react-native.es.js +118 -81514
- package/package.json +3 -2
- package/src/client/analytics.spec.ts +6 -0
- package/src/client/analytics.ts +1 -1
- package/src/react-native/index.ts +1 -0
- package/src/react-native/react-native.spec.ts +1 -1
- package/src/searchPage/searchPageClient.spec.ts +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coveo.analytics",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.3",
|
|
4
4
|
"description": "📈 Coveo analytics client (node and browser compatible) ",
|
|
5
5
|
"main": "dist/library.js",
|
|
6
6
|
"module": "dist/library.es.js",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"cross-fetch": "^3.1.5",
|
|
27
|
-
"uuid": "^9.0.0"
|
|
27
|
+
"uuid": "^9.0.0",
|
|
28
|
+
"react-native-get-random-values": "^1.8.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@rollup/plugin-alias": "^3.1.2",
|
|
@@ -462,6 +462,12 @@ describe('custom clientId', () => {
|
|
|
462
462
|
expect(await client.getCurrentVisitorId()).toBe('c7d57b22-4aa8-487a-a106-be5243885f0a');
|
|
463
463
|
});
|
|
464
464
|
|
|
465
|
+
it('persists clientId in lowercase', async () => {
|
|
466
|
+
const client = new CoveoAnalyticsClient({});
|
|
467
|
+
client.setClientId('C7D57B22-4AA8-487A-A106-BE5243885F0A');
|
|
468
|
+
expect(await client.getCurrentVisitorId()).toBe('c7d57b22-4aa8-487a-a106-be5243885f0a');
|
|
469
|
+
});
|
|
470
|
+
|
|
465
471
|
it('allows setting a custom consistent clientId given a string', async () => {
|
|
466
472
|
const client = new CoveoAnalyticsClient({});
|
|
467
473
|
client.setClientId('somestring', 'testNameSpace');
|
package/src/client/analytics.ts
CHANGED
|
@@ -228,7 +228,7 @@ export class CoveoAnalyticsClient implements AnalyticsClient, VisitorIdProvider
|
|
|
228
228
|
|
|
229
229
|
async setClientId(value: string, namespace?: string) {
|
|
230
230
|
if (uuidValidate(value)) {
|
|
231
|
-
this.setCurrentVisitorId(value);
|
|
231
|
+
this.setCurrentVisitorId(value.toLowerCase());
|
|
232
232
|
} else {
|
|
233
233
|
if (!namespace) {
|
|
234
234
|
throw Error('Cannot generate uuid client id without a specific namespace string.');
|