@algolia/client-analytics 5.19.0 → 5.20.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/README.md +4 -4
- package/dist/browser.d.ts +56 -56
- package/dist/builds/browser.js +22 -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 +22 -22
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +22 -22
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +22 -22
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +22 -22
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +56 -56
- package/dist/node.d.cts +56 -56
- package/dist/node.d.ts +56 -56
- package/dist/src/analyticsClient.cjs +22 -22
- package/dist/src/analyticsClient.cjs.map +1 -1
- package/dist/src/analyticsClient.js +22 -22
- package/dist/src/analyticsClient.js.map +1 -1
- package/dist/worker.d.ts +56 -56
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse
|
|
|
41
41
|
### With a package manager
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
yarn add @algolia/client-analytics@5.
|
|
44
|
+
yarn add @algolia/client-analytics@5.20.1
|
|
45
45
|
# or
|
|
46
|
-
npm install @algolia/client-analytics@5.
|
|
46
|
+
npm install @algolia/client-analytics@5.20.1
|
|
47
47
|
# or
|
|
48
|
-
pnpm add @algolia/client-analytics@5.
|
|
48
|
+
pnpm add @algolia/client-analytics@5.20.1
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
### Without a package manager
|
|
@@ -53,7 +53,7 @@ pnpm add @algolia/client-analytics@5.19.0
|
|
|
53
53
|
Add the following JavaScript snippet to the <head> of your website:
|
|
54
54
|
|
|
55
55
|
```html
|
|
56
|
-
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-analytics@5.
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-analytics@5.20.1/dist/builds/browser.umd.js"></script>
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
### Usage
|
package/dist/browser.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.1";
|
|
1369
1369
|
declare const REGIONS: readonly ["de", "us"];
|
|
1370
1370
|
type Region = (typeof REGIONS)[number];
|
|
1371
1371
|
type RegionOptions = {
|
|
@@ -1440,7 +1440,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1440
1440
|
*/
|
|
1441
1441
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
1442
1442
|
/**
|
|
1443
|
-
* 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.
|
|
1444
1444
|
*
|
|
1445
1445
|
* Required API Key ACLs:
|
|
1446
1446
|
* - analytics
|
|
@@ -1453,7 +1453,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1453
1453
|
*/
|
|
1454
1454
|
getAddToCartRate({ index, startDate, endDate, tags }: GetAddToCartRateProps, requestOptions?: RequestOptions): Promise<GetAddToCartRateResponse>;
|
|
1455
1455
|
/**
|
|
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
|
|
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.
|
|
1457
1457
|
*
|
|
1458
1458
|
* Required API Key ACLs:
|
|
1459
1459
|
* - analytics
|
|
@@ -1466,7 +1466,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1466
1466
|
*/
|
|
1467
1467
|
getAverageClickPosition({ index, startDate, endDate, tags }: GetAverageClickPositionProps, requestOptions?: RequestOptions): Promise<GetAverageClickPositionResponse>;
|
|
1468
1468
|
/**
|
|
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.
|
|
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.
|
|
1470
1470
|
*
|
|
1471
1471
|
* Required API Key ACLs:
|
|
1472
1472
|
* - analytics
|
|
@@ -1479,7 +1479,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1479
1479
|
*/
|
|
1480
1480
|
getClickPositions({ index, startDate, endDate, tags }: GetClickPositionsProps, requestOptions?: RequestOptions): Promise<GetClickPositionsResponse>;
|
|
1481
1481
|
/**
|
|
1482
|
-
* 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.
|
|
1483
1483
|
*
|
|
1484
1484
|
* Required API Key ACLs:
|
|
1485
1485
|
* - analytics
|
|
@@ -1492,7 +1492,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1492
1492
|
*/
|
|
1493
1493
|
getClickThroughRate({ index, startDate, endDate, tags }: GetClickThroughRateProps, requestOptions?: RequestOptions): Promise<GetClickThroughRateResponse>;
|
|
1494
1494
|
/**
|
|
1495
|
-
* 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.
|
|
1496
1496
|
*
|
|
1497
1497
|
* Required API Key ACLs:
|
|
1498
1498
|
* - analytics
|
|
@@ -1505,7 +1505,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1505
1505
|
*/
|
|
1506
1506
|
getConversionRate({ index, startDate, endDate, tags }: GetConversionRateProps, requestOptions?: RequestOptions): Promise<GetConversionRateResponse>;
|
|
1507
1507
|
/**
|
|
1508
|
-
* 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.
|
|
1509
1509
|
*
|
|
1510
1510
|
* Required API Key ACLs:
|
|
1511
1511
|
* - analytics
|
|
@@ -1518,7 +1518,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1518
1518
|
*/
|
|
1519
1519
|
getNoClickRate({ index, startDate, endDate, tags }: GetNoClickRateProps, requestOptions?: RequestOptions): Promise<GetNoClickRateResponse>;
|
|
1520
1520
|
/**
|
|
1521
|
-
* 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.
|
|
1522
1522
|
*
|
|
1523
1523
|
* Required API Key ACLs:
|
|
1524
1524
|
* - analytics
|
|
@@ -1531,7 +1531,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1531
1531
|
*/
|
|
1532
1532
|
getNoResultsRate({ index, startDate, endDate, tags }: GetNoResultsRateProps, requestOptions?: RequestOptions): Promise<GetNoResultsRateResponse>;
|
|
1533
1533
|
/**
|
|
1534
|
-
* 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.
|
|
1535
1535
|
*
|
|
1536
1536
|
* Required API Key ACLs:
|
|
1537
1537
|
* - analytics
|
|
@@ -1544,7 +1544,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1544
1544
|
*/
|
|
1545
1545
|
getPurchaseRate({ index, startDate, endDate, tags }: GetPurchaseRateProps, requestOptions?: RequestOptions): Promise<GetPurchaseRateResponse>;
|
|
1546
1546
|
/**
|
|
1547
|
-
* 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.
|
|
1548
1548
|
*
|
|
1549
1549
|
* Required API Key ACLs:
|
|
1550
1550
|
* - analytics
|
|
@@ -1570,7 +1570,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1570
1570
|
*/
|
|
1571
1571
|
getSearchesCount({ index, startDate, endDate, tags }: GetSearchesCountProps, requestOptions?: RequestOptions): Promise<GetSearchesCountResponse>;
|
|
1572
1572
|
/**
|
|
1573
|
-
* 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.
|
|
1574
1574
|
*
|
|
1575
1575
|
* Required API Key ACLs:
|
|
1576
1576
|
* - analytics
|
|
@@ -1585,7 +1585,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1585
1585
|
*/
|
|
1586
1586
|
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>;
|
|
1587
1587
|
/**
|
|
1588
|
-
* Retrieves the most
|
|
1588
|
+
* Retrieves the 1,000 most frequent searches that produced zero results.
|
|
1589
1589
|
*
|
|
1590
1590
|
* Required API Key ACLs:
|
|
1591
1591
|
* - analytics
|
|
@@ -1600,7 +1600,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1600
1600
|
*/
|
|
1601
1601
|
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>;
|
|
1602
1602
|
/**
|
|
1603
|
-
* 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.
|
|
1604
1604
|
*
|
|
1605
1605
|
* Required API Key ACLs:
|
|
1606
1606
|
* - analytics
|
|
@@ -1610,7 +1610,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1610
1610
|
*/
|
|
1611
1611
|
getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise<GetStatusResponse>;
|
|
1612
1612
|
/**
|
|
1613
|
-
* Retrieves the countries with the most searches
|
|
1613
|
+
* Retrieves the countries with the most searches in your index.
|
|
1614
1614
|
*
|
|
1615
1615
|
* Required API Key ACLs:
|
|
1616
1616
|
* - analytics
|
|
@@ -1625,7 +1625,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1625
1625
|
*/
|
|
1626
1626
|
getTopCountries({ index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, requestOptions?: RequestOptions): Promise<GetTopCountriesResponse>;
|
|
1627
1627
|
/**
|
|
1628
|
-
* 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.
|
|
1629
1629
|
*
|
|
1630
1630
|
* Required API Key ACLs:
|
|
1631
1631
|
* - analytics
|
|
@@ -1641,7 +1641,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1641
1641
|
*/
|
|
1642
1642
|
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>;
|
|
1643
1643
|
/**
|
|
1644
|
-
* 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.
|
|
1645
1645
|
*
|
|
1646
1646
|
* Required API Key ACLs:
|
|
1647
1647
|
* - analytics
|
|
@@ -1658,7 +1658,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1658
1658
|
*/
|
|
1659
1659
|
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>;
|
|
1660
1660
|
/**
|
|
1661
|
-
* 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.
|
|
1662
1662
|
*
|
|
1663
1663
|
* Required API Key ACLs:
|
|
1664
1664
|
* - analytics
|
|
@@ -1674,7 +1674,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1674
1674
|
*/
|
|
1675
1675
|
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>;
|
|
1676
1676
|
/**
|
|
1677
|
-
* 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.
|
|
1678
1678
|
*
|
|
1679
1679
|
* Required API Key ACLs:
|
|
1680
1680
|
* - analytics
|
|
@@ -1682,7 +1682,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1682
1682
|
* @param getTopHits.index - Index name.
|
|
1683
1683
|
* @param getTopHits.search - Search query.
|
|
1684
1684
|
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1685
|
-
* @param getTopHits.revenueAnalytics - Whether to include
|
|
1685
|
+
* @param getTopHits.revenueAnalytics - Whether to include metrics related to revenue events in the response.
|
|
1686
1686
|
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1687
1687
|
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1688
1688
|
* @param getTopHits.limit - Number of items to return.
|
|
@@ -1692,14 +1692,14 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1692
1692
|
*/
|
|
1693
1693
|
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>;
|
|
1694
1694
|
/**
|
|
1695
|
-
* 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.
|
|
1696
1696
|
*
|
|
1697
1697
|
* Required API Key ACLs:
|
|
1698
1698
|
* - analytics
|
|
1699
1699
|
* @param getTopSearches - The getTopSearches object.
|
|
1700
1700
|
* @param getTopSearches.index - Index name.
|
|
1701
1701
|
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
1702
|
-
* @param getTopSearches.revenueAnalytics - Whether to include
|
|
1702
|
+
* @param getTopSearches.revenueAnalytics - Whether to include metrics related to revenue events in the response.
|
|
1703
1703
|
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1704
1704
|
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1705
1705
|
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
@@ -1711,7 +1711,7 @@ declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOptio
|
|
|
1711
1711
|
*/
|
|
1712
1712
|
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: GetTopSearchesProps, requestOptions?: RequestOptions): Promise<GetTopSearchesResponse>;
|
|
1713
1713
|
/**
|
|
1714
|
-
* 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.
|
|
1715
1715
|
*
|
|
1716
1716
|
* Required API Key ACLs:
|
|
1717
1717
|
* - analytics
|