@algolia/client-analytics 5.18.0 → 5.20.0
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/README.md +4 -4
- package/dist/browser.d.ts +60 -56
- package/dist/builds/browser.js +26 -22
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +1 -1
- package/dist/builds/fetch.js +26 -22
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +26 -22
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +26 -22
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +26 -22
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +60 -56
- package/dist/node.d.cts +60 -56
- package/dist/node.d.ts +60 -56
- package/dist/src/analyticsClient.cjs +26 -22
- package/dist/src/analyticsClient.cjs.map +1 -1
- package/dist/src/analyticsClient.js +26 -22
- package/dist/src/analyticsClient.js.map +1 -1
- package/dist/worker.d.ts +60 -56
- package/package.json +10 -10
package/dist/fetch.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/cli
|
|
|
3
3
|
|
|
4
4
|
type DailyAddToCartRates = {
|
|
5
5
|
/**
|
|
6
|
-
* Add-to-cart rate
|
|
6
|
+
* Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
7
7
|
*/
|
|
8
8
|
rate: number | null;
|
|
9
9
|
/**
|
|
@@ -22,7 +22,7 @@ type DailyAddToCartRates = {
|
|
|
22
22
|
|
|
23
23
|
type GetAddToCartRateResponse = {
|
|
24
24
|
/**
|
|
25
|
-
* Add-to-cart rate
|
|
25
|
+
* Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
26
26
|
*/
|
|
27
27
|
rate: number | null;
|
|
28
28
|
/**
|
|
@@ -92,7 +92,7 @@ type GetClickPositionsResponse = {
|
|
|
92
92
|
|
|
93
93
|
type DailyClickThroughRates = {
|
|
94
94
|
/**
|
|
95
|
-
* Click-through rate
|
|
95
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
96
96
|
*/
|
|
97
97
|
rate: number | null;
|
|
98
98
|
/**
|
|
@@ -111,7 +111,7 @@ type DailyClickThroughRates = {
|
|
|
111
111
|
|
|
112
112
|
type GetClickThroughRateResponse = {
|
|
113
113
|
/**
|
|
114
|
-
* Click-through rate
|
|
114
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
115
115
|
*/
|
|
116
116
|
rate: number | null;
|
|
117
117
|
/**
|
|
@@ -130,7 +130,7 @@ type GetClickThroughRateResponse = {
|
|
|
130
130
|
|
|
131
131
|
type DailyConversionRates = {
|
|
132
132
|
/**
|
|
133
|
-
* Conversion rate
|
|
133
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
134
134
|
*/
|
|
135
135
|
rate: number | null;
|
|
136
136
|
/**
|
|
@@ -149,7 +149,7 @@ type DailyConversionRates = {
|
|
|
149
149
|
|
|
150
150
|
type GetConversionRateResponse = {
|
|
151
151
|
/**
|
|
152
|
-
* Conversion rate
|
|
152
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
153
153
|
*/
|
|
154
154
|
rate: number | null;
|
|
155
155
|
/**
|
|
@@ -168,7 +168,7 @@ type GetConversionRateResponse = {
|
|
|
168
168
|
|
|
169
169
|
type DailyNoClickRates = {
|
|
170
170
|
/**
|
|
171
|
-
* No click rate
|
|
171
|
+
* No click rate: calculated as the number of tracked searches without clicks divided by the number of tracked searches.
|
|
172
172
|
*/
|
|
173
173
|
rate: number;
|
|
174
174
|
/**
|
|
@@ -187,7 +187,7 @@ type DailyNoClickRates = {
|
|
|
187
187
|
|
|
188
188
|
type GetNoClickRateResponse = {
|
|
189
189
|
/**
|
|
190
|
-
* No click rate
|
|
190
|
+
* No click rate: calculated as the number of tracked searches without clicks divided by the number of tracked searches.
|
|
191
191
|
*/
|
|
192
192
|
rate: number;
|
|
193
193
|
/**
|
|
@@ -218,14 +218,14 @@ type DailyNoResultsRates = {
|
|
|
218
218
|
*/
|
|
219
219
|
count: number;
|
|
220
220
|
/**
|
|
221
|
-
* No results rate
|
|
221
|
+
* No results rate: calculated as the number of searches with zero results divided by the total number of searches.
|
|
222
222
|
*/
|
|
223
223
|
rate: number;
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
type GetNoResultsRateResponse = {
|
|
227
227
|
/**
|
|
228
|
-
* No results rate
|
|
228
|
+
* No results rate: calculated as the number of searches with zero results divided by the total number of searches.
|
|
229
229
|
*/
|
|
230
230
|
rate: number;
|
|
231
231
|
/**
|
|
@@ -244,7 +244,7 @@ type GetNoResultsRateResponse = {
|
|
|
244
244
|
|
|
245
245
|
type DailyPurchaseRates = {
|
|
246
246
|
/**
|
|
247
|
-
* Purchase rate
|
|
247
|
+
* Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
248
248
|
*/
|
|
249
249
|
rate: number | null;
|
|
250
250
|
/**
|
|
@@ -263,7 +263,7 @@ type DailyPurchaseRates = {
|
|
|
263
263
|
|
|
264
264
|
type GetPurchaseRateResponse = {
|
|
265
265
|
/**
|
|
266
|
-
* Purchase rate
|
|
266
|
+
* Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
267
267
|
*/
|
|
268
268
|
rate: number | null;
|
|
269
269
|
/**
|
|
@@ -296,7 +296,7 @@ type CurrencyCode = {
|
|
|
296
296
|
|
|
297
297
|
type DailyRevenue = {
|
|
298
298
|
/**
|
|
299
|
-
* Revenue associated with this search
|
|
299
|
+
* Revenue associated with this search: broken down by currency.
|
|
300
300
|
*/
|
|
301
301
|
currencies: {
|
|
302
302
|
[key: string]: CurrencyCode;
|
|
@@ -309,7 +309,7 @@ type DailyRevenue = {
|
|
|
309
309
|
|
|
310
310
|
type GetRevenue = {
|
|
311
311
|
/**
|
|
312
|
-
* Revenue associated with this search
|
|
312
|
+
* Revenue associated with this search: broken down by currency.
|
|
313
313
|
*/
|
|
314
314
|
currencies: {
|
|
315
315
|
[key: string]: CurrencyCode;
|
|
@@ -482,14 +482,14 @@ type GetTopFiltersNoResultsValues = {
|
|
|
482
482
|
|
|
483
483
|
type GetTopFiltersNoResultsResponse = {
|
|
484
484
|
/**
|
|
485
|
-
* Filters for searches without any results. If null, the search term specified with the `search` parameter
|
|
485
|
+
* Filters for searches without any results. If null, the search term specified with the `search` parameter isn\'t a search without results, or the `search` parameter is absent from the request.
|
|
486
486
|
*/
|
|
487
487
|
values: Array<GetTopFiltersNoResultsValues> | null;
|
|
488
488
|
};
|
|
489
489
|
|
|
490
490
|
type TopHit = {
|
|
491
491
|
/**
|
|
492
|
-
* Object ID of a record
|
|
492
|
+
* Object ID of a record returned as a search result.
|
|
493
493
|
*/
|
|
494
494
|
hit: string;
|
|
495
495
|
/**
|
|
@@ -507,7 +507,7 @@ type TopHitsResponse = {
|
|
|
507
507
|
|
|
508
508
|
type TopHitWithAnalytics = {
|
|
509
509
|
/**
|
|
510
|
-
* Object ID of a record
|
|
510
|
+
* Object ID of a record returned as a search result.
|
|
511
511
|
*/
|
|
512
512
|
hit: string;
|
|
513
513
|
/**
|
|
@@ -515,11 +515,11 @@ type TopHitWithAnalytics = {
|
|
|
515
515
|
*/
|
|
516
516
|
count: number;
|
|
517
517
|
/**
|
|
518
|
-
* Click-through rate
|
|
518
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
519
519
|
*/
|
|
520
520
|
clickThroughRate: number | null;
|
|
521
521
|
/**
|
|
522
|
-
* Conversion rate
|
|
522
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
523
523
|
*/
|
|
524
524
|
conversionRate: number | null;
|
|
525
525
|
/**
|
|
@@ -545,7 +545,7 @@ type TopHitsResponseWithAnalytics = {
|
|
|
545
545
|
|
|
546
546
|
type TopHitWithRevenueAnalytics = {
|
|
547
547
|
/**
|
|
548
|
-
* Object ID of a record
|
|
548
|
+
* Object ID of a record returned as a search result.
|
|
549
549
|
*/
|
|
550
550
|
hit: string;
|
|
551
551
|
/**
|
|
@@ -553,11 +553,11 @@ type TopHitWithRevenueAnalytics = {
|
|
|
553
553
|
*/
|
|
554
554
|
count: number;
|
|
555
555
|
/**
|
|
556
|
-
* Click-through rate
|
|
556
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
557
557
|
*/
|
|
558
558
|
clickThroughRate: number | null;
|
|
559
559
|
/**
|
|
560
|
-
* Conversion rate
|
|
560
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
561
561
|
*/
|
|
562
562
|
conversionRate: number | null;
|
|
563
563
|
/**
|
|
@@ -573,7 +573,7 @@ type TopHitWithRevenueAnalytics = {
|
|
|
573
573
|
*/
|
|
574
574
|
conversionCount: number;
|
|
575
575
|
/**
|
|
576
|
-
* Add-to-cart rate
|
|
576
|
+
* Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
577
577
|
*/
|
|
578
578
|
addToCartRate: number | null;
|
|
579
579
|
/**
|
|
@@ -581,7 +581,7 @@ type TopHitWithRevenueAnalytics = {
|
|
|
581
581
|
*/
|
|
582
582
|
addToCartCount: number;
|
|
583
583
|
/**
|
|
584
|
-
* Purchase rate
|
|
584
|
+
* Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
585
585
|
*/
|
|
586
586
|
purchaseRate: number | null;
|
|
587
587
|
/**
|
|
@@ -589,7 +589,7 @@ type TopHitWithRevenueAnalytics = {
|
|
|
589
589
|
*/
|
|
590
590
|
purchaseCount: number;
|
|
591
591
|
/**
|
|
592
|
-
* Revenue associated with this search
|
|
592
|
+
* Revenue associated with this search: broken down by currency.
|
|
593
593
|
*/
|
|
594
594
|
currencies: {
|
|
595
595
|
[key: string]: CurrencyCode;
|
|
@@ -637,7 +637,7 @@ type TopSearchWithAnalytics = {
|
|
|
637
637
|
*/
|
|
638
638
|
count: number;
|
|
639
639
|
/**
|
|
640
|
-
* Click-through rate
|
|
640
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
641
641
|
*/
|
|
642
642
|
clickThroughRate: number | null;
|
|
643
643
|
/**
|
|
@@ -649,7 +649,7 @@ type TopSearchWithAnalytics = {
|
|
|
649
649
|
*/
|
|
650
650
|
clickPositions: Array<ClickPosition>;
|
|
651
651
|
/**
|
|
652
|
-
* Conversion rate
|
|
652
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
653
653
|
*/
|
|
654
654
|
conversionRate: number | null;
|
|
655
655
|
/**
|
|
@@ -687,7 +687,7 @@ type TopSearchWithRevenueAnalytics = {
|
|
|
687
687
|
*/
|
|
688
688
|
count: number;
|
|
689
689
|
/**
|
|
690
|
-
* Click-through rate
|
|
690
|
+
* Click-through rate: calculated as the number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
691
691
|
*/
|
|
692
692
|
clickThroughRate: number | null;
|
|
693
693
|
/**
|
|
@@ -699,7 +699,7 @@ type TopSearchWithRevenueAnalytics = {
|
|
|
699
699
|
*/
|
|
700
700
|
clickPositions: Array<ClickPosition>;
|
|
701
701
|
/**
|
|
702
|
-
* Conversion rate
|
|
702
|
+
* Conversion rate: calculated as the number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
703
703
|
*/
|
|
704
704
|
conversionRate: number | null;
|
|
705
705
|
/**
|
|
@@ -719,13 +719,13 @@ type TopSearchWithRevenueAnalytics = {
|
|
|
719
719
|
*/
|
|
720
720
|
nbHits: number;
|
|
721
721
|
/**
|
|
722
|
-
* Revenue associated with this search
|
|
722
|
+
* Revenue associated with this search: broken down by currency.
|
|
723
723
|
*/
|
|
724
724
|
currencies: {
|
|
725
725
|
[key: string]: CurrencyCode;
|
|
726
726
|
};
|
|
727
727
|
/**
|
|
728
|
-
* Add-to-cart rate
|
|
728
|
+
* Add-to-cart rate: calculated as the number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
729
729
|
*/
|
|
730
730
|
addToCartRate: number | null;
|
|
731
731
|
/**
|
|
@@ -733,7 +733,7 @@ type TopSearchWithRevenueAnalytics = {
|
|
|
733
733
|
*/
|
|
734
734
|
addToCartCount: number;
|
|
735
735
|
/**
|
|
736
|
-
* Purchase rate
|
|
736
|
+
* Purchase rate: calculated as the number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
|
|
737
737
|
*/
|
|
738
738
|
purchaseRate: number | null;
|
|
739
739
|
/**
|
|
@@ -1274,7 +1274,7 @@ type GetTopHitsProps = {
|
|
|
1274
1274
|
*/
|
|
1275
1275
|
clickAnalytics?: boolean;
|
|
1276
1276
|
/**
|
|
1277
|
-
* Whether to include
|
|
1277
|
+
* Whether to include metrics related to revenue events in the response.
|
|
1278
1278
|
*/
|
|
1279
1279
|
revenueAnalytics?: boolean;
|
|
1280
1280
|
/**
|
|
@@ -1311,7 +1311,7 @@ type GetTopSearchesProps = {
|
|
|
1311
1311
|
*/
|
|
1312
1312
|
clickAnalytics?: boolean;
|
|
1313
1313
|
/**
|
|
1314
|
-
* Whether to include
|
|
1314
|
+
* Whether to include metrics related to revenue events in the response.
|
|
1315
1315
|
*/
|
|
1316
1316
|
revenueAnalytics?: boolean;
|
|
1317
1317
|
/**
|
|
@@ -1365,7 +1365,7 @@ type GetUsersCountProps = {
|
|
|
1365
1365
|
tags?: string;
|
|
1366
1366
|
};
|
|
1367
1367
|
|
|
1368
|
-
declare const apiClientVersion = "5.
|
|
1368
|
+
declare const apiClientVersion = "5.20.0";
|
|
1369
1369
|
declare const REGIONS: readonly ["de", "us"];
|
|
1370
1370
|
type Region = (typeof REGIONS)[number];
|
|
1371
1371
|
type RegionOptions = {
|
|
@@ -1377,6 +1377,10 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1377
1377
|
* The `appId` currently in use.
|
|
1378
1378
|
*/
|
|
1379
1379
|
appId: string;
|
|
1380
|
+
/**
|
|
1381
|
+
* The `apiKey` currently in use.
|
|
1382
|
+
*/
|
|
1383
|
+
apiKey: string;
|
|
1380
1384
|
/**
|
|
1381
1385
|
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
1382
1386
|
*/
|
|
@@ -1436,7 +1440,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1436
1440
|
*/
|
|
1437
1441
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1438
1442
|
/**
|
|
1439
|
-
* Retrieves the add-to-cart rate for all
|
|
1443
|
+
* Retrieves the add-to-cart rate for all your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of add-to-cart conversion events divided by the number of tracked searches. A search is tracked if it returns a queryID (`clickAnalytics` is `true`). This differs from the response\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\'s a difference between a 0 and null add-to-cart rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\'t receive any events, the add-to-cart rate is null. - **0** mean there _were_ queries but no [add-to-cart events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1440
1444
|
*
|
|
1441
1445
|
* Required API Key ACLs:
|
|
1442
1446
|
* - analytics
|
|
@@ -1449,7 +1453,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1449
1453
|
*/
|
|
1450
1454
|
getAddToCartRate({ index, startDate, endDate, tags }: GetAddToCartRateProps, requestOptions?: RequestOptions): Promise<GetAddToCartRateResponse>;
|
|
1451
1455
|
/**
|
|
1452
|
-
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search
|
|
1456
|
+
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search result positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day. An average of `null` when `clickAnalytics` is enabled means Algolia didn\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) for the queries. The average is `null` until Algolia receives at least one click event.
|
|
1453
1457
|
*
|
|
1454
1458
|
* Required API Key ACLs:
|
|
1455
1459
|
* - analytics
|
|
@@ -1462,7 +1466,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1462
1466
|
*/
|
|
1463
1467
|
getAverageClickPosition({ index, startDate, endDate, tags }: GetAverageClickPositionProps, requestOptions?: RequestOptions): Promise<GetAverageClickPositionResponse>;
|
|
1464
1468
|
/**
|
|
1465
|
-
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
1469
|
+
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive. An average of `0` when `clickAnalytics` is enabled means Algolia didn\'t receive any [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) for the queries.
|
|
1466
1470
|
*
|
|
1467
1471
|
* Required API Key ACLs:
|
|
1468
1472
|
* - analytics
|
|
@@ -1475,7 +1479,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1475
1479
|
*/
|
|
1476
1480
|
getClickPositions({ index, startDate, endDate, tags }: GetClickPositionsProps, requestOptions?: RequestOptions): Promise<GetClickPositionsResponse>;
|
|
1477
1481
|
/**
|
|
1478
|
-
* Retrieves the click-through rate for all
|
|
1482
|
+
* Retrieves the click-through rate (CTR) for all your searches with at least one click event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\'s a difference between a 0 and null CTR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\'t receive any events, CTR is null. - **0** mean there _were_ queries but no [click events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1479
1483
|
*
|
|
1480
1484
|
* Required API Key ACLs:
|
|
1481
1485
|
* - analytics
|
|
@@ -1488,7 +1492,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1488
1492
|
*/
|
|
1489
1493
|
getClickThroughRate({ index, startDate, endDate, tags }: GetClickThroughRateProps, requestOptions?: RequestOptions): Promise<GetClickThroughRateResponse>;
|
|
1490
1494
|
/**
|
|
1491
|
-
* Retrieves the conversion rate for all
|
|
1495
|
+
* Retrieves the conversion rate (CR) for all your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. **There\'s a difference between a 0 and null CR when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\'t receive any events, CR is null. - **0** mean there _were_ queries but no [conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1492
1496
|
*
|
|
1493
1497
|
* Required API Key ACLs:
|
|
1494
1498
|
* - analytics
|
|
@@ -1501,7 +1505,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1501
1505
|
*/
|
|
1502
1506
|
getConversionRate({ index, startDate, endDate, tags }: GetConversionRateProps, requestOptions?: RequestOptions): Promise<GetConversionRateResponse>;
|
|
1503
1507
|
/**
|
|
1504
|
-
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1508
|
+
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. It also returns the number of tracked searches and tracked searches without clicks. By default, the analyzed period includes the last eight days including the current day.
|
|
1505
1509
|
*
|
|
1506
1510
|
* Required API Key ACLs:
|
|
1507
1511
|
* - analytics
|
|
@@ -1514,7 +1518,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1514
1518
|
*/
|
|
1515
1519
|
getNoClickRate({ index, startDate, endDate, tags }: GetNoClickRateProps, requestOptions?: RequestOptions): Promise<GetNoClickRateResponse>;
|
|
1516
1520
|
/**
|
|
1517
|
-
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
1521
|
+
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. It also returns the count of searches and searches without results used to compute the rates. By default, the analyzed period includes the last eight days including the current day.
|
|
1518
1522
|
*
|
|
1519
1523
|
* Required API Key ACLs:
|
|
1520
1524
|
* - analytics
|
|
@@ -1527,7 +1531,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1527
1531
|
*/
|
|
1528
1532
|
getNoResultsRate({ index, startDate, endDate, tags }: GetNoResultsRateProps, requestOptions?: RequestOptions): Promise<GetNoResultsRateResponse>;
|
|
1529
1533
|
/**
|
|
1530
|
-
* Retrieves the purchase rate for all
|
|
1534
|
+
* Retrieves the purchase rate for all your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. The rate is the number of purchase conversion events divided by the number of tracked searches. A search is tracked if it returns a query ID (`clickAnalytics` is `true`). This differs from the response\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. **There\'s a difference between a 0 and null purchase rate when `clickAnalytics` is enabled:** - **Null** means there were no queries: since Algolia didn\'t receive any events, the purchase rate is null. - **0** mean there _were_ queries but no [purchase conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1531
1535
|
*
|
|
1532
1536
|
* Required API Key ACLs:
|
|
1533
1537
|
* - analytics
|
|
@@ -1540,7 +1544,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1540
1544
|
*/
|
|
1541
1545
|
getPurchaseRate({ index, startDate, endDate, tags }: GetPurchaseRateProps, requestOptions?: RequestOptions): Promise<GetPurchaseRateResponse>;
|
|
1542
1546
|
/**
|
|
1543
|
-
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics,
|
|
1547
|
+
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, send purchase events. By default, the analyzed period includes the last eight days including the current day. Revenue is based on purchase conversion events (a conversion event with an `eventSubtype` attribute of `purchase`). The revenue is the `price` attribute multiplied by the `quantity` attribute for each object in the event\'s `objectData` array.
|
|
1544
1548
|
*
|
|
1545
1549
|
* Required API Key ACLs:
|
|
1546
1550
|
* - analytics
|
|
@@ -1566,7 +1570,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1566
1570
|
*/
|
|
1567
1571
|
getSearchesCount({ index, startDate, endDate, tags }: GetSearchesCountProps, requestOptions?: RequestOptions): Promise<GetSearchesCountResponse>;
|
|
1568
1572
|
/**
|
|
1569
|
-
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
1573
|
+
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches. For each search, it also returns the number of displayed search results that remained unclicked.
|
|
1570
1574
|
*
|
|
1571
1575
|
* Required API Key ACLs:
|
|
1572
1576
|
* - analytics
|
|
@@ -1581,7 +1585,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1581
1585
|
*/
|
|
1582
1586
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>;
|
|
1583
1587
|
/**
|
|
1584
|
-
* Retrieves the most
|
|
1588
|
+
* Retrieves the 1,000 most frequent searches that produced zero results.
|
|
1585
1589
|
*
|
|
1586
1590
|
* Required API Key ACLs:
|
|
1587
1591
|
* - analytics
|
|
@@ -1596,7 +1600,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1596
1600
|
*/
|
|
1597
1601
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>;
|
|
1598
1602
|
/**
|
|
1599
|
-
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5
|
|
1603
|
+
* Retrieves the time when the Analytics data for the specified index was last updated. If the index has been recently created or no search has been performed yet the updated time is `null`. The Analytics data is updated every 5 minutes.
|
|
1600
1604
|
*
|
|
1601
1605
|
* Required API Key ACLs:
|
|
1602
1606
|
* - analytics
|
|
@@ -1606,7 +1610,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1606
1610
|
*/
|
|
1607
1611
|
getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise<GetStatusResponse>;
|
|
1608
1612
|
/**
|
|
1609
|
-
* Retrieves the countries with the most searches
|
|
1613
|
+
* Retrieves the countries with the most searches in your index.
|
|
1610
1614
|
*
|
|
1611
1615
|
* Required API Key ACLs:
|
|
1612
1616
|
* - analytics
|
|
@@ -1621,7 +1625,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1621
1625
|
*/
|
|
1622
1626
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, requestOptions?: RequestOptions): Promise<GetTopCountriesResponse>;
|
|
1623
1627
|
/**
|
|
1624
|
-
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1628
|
+
* Retrieves the 1,000 most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1625
1629
|
*
|
|
1626
1630
|
* Required API Key ACLs:
|
|
1627
1631
|
* - analytics
|
|
@@ -1637,7 +1641,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1637
1641
|
*/
|
|
1638
1642
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>;
|
|
1639
1643
|
/**
|
|
1640
|
-
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1644
|
+
* Retrieves the 1,000 most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
1641
1645
|
*
|
|
1642
1646
|
* Required API Key ACLs:
|
|
1643
1647
|
* - analytics
|
|
@@ -1654,7 +1658,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1654
1658
|
*/
|
|
1655
1659
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>;
|
|
1656
1660
|
/**
|
|
1657
|
-
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
1661
|
+
* Retrieves the 1,000 most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
1658
1662
|
*
|
|
1659
1663
|
* Required API Key ACLs:
|
|
1660
1664
|
* - analytics
|
|
@@ -1670,7 +1674,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1670
1674
|
*/
|
|
1671
1675
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>;
|
|
1672
1676
|
/**
|
|
1673
|
-
* Retrieves the object IDs of the most frequent search results.
|
|
1677
|
+
* Retrieves the object IDs of the 1,000 most frequent search results. If you set the `clickAnalytics` query parameter to true, the response also includes: - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1674
1678
|
*
|
|
1675
1679
|
* Required API Key ACLs:
|
|
1676
1680
|
* - analytics
|
|
@@ -1678,7 +1682,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1678
1682
|
* @param getTopHits.index - Index name.
|
|
1679
1683
|
* @param getTopHits.search - Search query.
|
|
1680
1684
|
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1681
|
-
* @param getTopHits.revenueAnalytics - Whether to include
|
|
1685
|
+
* @param getTopHits.revenueAnalytics - Whether to include metrics related to revenue events in the response.
|
|
1682
1686
|
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1683
1687
|
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1684
1688
|
* @param getTopHits.limit - Number of items to return.
|
|
@@ -1688,14 +1692,14 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1688
1692
|
*/
|
|
1689
1693
|
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>;
|
|
1690
1694
|
/**
|
|
1691
|
-
* Returns the most popular search
|
|
1695
|
+
* Returns the most popular searches. For each search, it also includes the average number of hits. If you set the `clickAnalytics` query parameter to `true`, the response also includes - Tracked searches count. Tracked searches are Search API requests with the `clickAnalytics` parameter set to `true`. This differs from the response\'s `count`, which shows the overall number of searches, including those where `clickAnalytics` is `false`. - Click count - Click-through rate (CTR) - Conversion count - Conversion rate (CR) - Average click position If you set the `revenueAnalytics` query parameter to `true`, the response also includes: - Add-to-cart count - Add-to-cart rate (ATCR) - Purchase count - Purchase rate - Revenue details for each currency **There\'s a difference between 0% rates and null rates:** - **Null** means there were no queries: since Algolia didn\'t receive any events, the rates (CTR, CR, ATCR, purchase rate) are null. - **0% rates** mean there _were_ queries but no [click or conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started/) were received.
|
|
1692
1696
|
*
|
|
1693
1697
|
* Required API Key ACLs:
|
|
1694
1698
|
* - analytics
|
|
1695
1699
|
* @param getTopSearches - The getTopSearches object.
|
|
1696
1700
|
* @param getTopSearches.index - Index name.
|
|
1697
1701
|
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1698
|
-
* @param getTopSearches.revenueAnalytics - Whether to include
|
|
1702
|
+
* @param getTopSearches.revenueAnalytics - Whether to include metrics related to revenue events in the response.
|
|
1699
1703
|
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1700
1704
|
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1701
1705
|
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
@@ -1707,7 +1711,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1707
1711
|
*/
|
|
1708
1712
|
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: GetTopSearchesProps, requestOptions?: RequestOptions): Promise<GetTopSearchesResponse>;
|
|
1709
1713
|
/**
|
|
1710
|
-
* Retrieves the number of unique users within a time range, including a daily breakdown. Since
|
|
1714
|
+
* Retrieves the number of unique users within a time range, including a daily breakdown. Since it returns the number of unique users, the sum of the daily values might be different from the total number. By default: - Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. - The analyzed period includes the last eight days including the current day.
|
|
1711
1715
|
*
|
|
1712
1716
|
* Required API Key ACLs:
|
|
1713
1717
|
* - analytics
|