Skip to content

Commit 037d96c

Browse files
committed
use correct property names in code snippet [netlify-build]
1 parent 9aab77e commit 037d96c

File tree

1 file changed

+20
-13
lines changed
  • src/connections/destinations/catalog/actions-algolia-insights

1 file changed

+20
-13
lines changed

src/connections/destinations/catalog/actions-algolia-insights/index.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Your app ID and API key can be found in the **API Keys** section of your account
3535

3636
### Algolia-related data
3737

38-
The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to add additional Algolia-related data like index name and query ID.
38+
The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to add additional Algolia-related data like an index name and a query ID.
3939

40-
To access your query ID, make sure `clickAnalytics` is enabled in your searches. If you're using our JavaScript search API client, this will look like:
40+
To access your query ID, make sure [`clickAnalytics`](https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics/) is enabled in your searches. If you're using our JavaScript search API client, this will look like:
4141

4242
```js
4343
index.search('query', {
@@ -60,7 +60,7 @@ By default, Algolia has set up mappings for `Product List Filtered`, `Product Cl
6060

6161
If you're not familiar with the Segment spec, take a look to understand what the [Track method](/docs/connections/spec/track/) does.
6262

63-
Algolia supports the following events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/).
63+
Algolia supports the following Segment events out of the box:
6464

6565
<table>
6666
<tr>
@@ -93,38 +93,45 @@ For a full list of required properties for each event type, see [Spec: V2 Ecomme
9393

9494
```js
9595
analytics.track('Product List Filtered', {
96-
index: "my-index-name",
96+
search_index: "my-index-name",
9797
filters: [
9898
{
9999
attribute: "color",
100100
value: "yellow",
101101
}
102102
],
103-
queryID: "Algolia queryID", // required only for Click Analytics,
103+
query_id: "Algolia queryID", // required only for Click Analytics,
104104
// ... other required properties from the spec
105105
})
106106

107107
analytics.track('Product Clicked', {
108-
index: "my-index-name",
109-
objectID: "hit objectID",
108+
search_index: "my-index-name",
109+
product_id: "hit objectID",
110110
position: hitPositionOnIndex, // number
111-
queryID: "Algolia queryID", // required only for Click Analytics,
111+
query_id: "Algolia queryID", // required only for Click Analytics,
112112
// ... other required properties from the spec
113113
})
114114

115115
analytics.track('Product Viewed', {
116-
index: "my-index-name",
117-
objectID: "hit objectID",
118-
queryID: "Algolia queryID", // required only for Click Analytics,
116+
search_index: "my-index-name",
117+
product_id: "hit objectID",
118+
query_id: "Algolia queryID", // required only for Click Analytics,
119+
// ... other required properties from the spec
120+
})
121+
122+
analytics.track('Product Added', {
123+
search_index: "my-index-name",
124+
product_id: "hit objectID",
125+
query_id: "Algolia queryID", // required only for Click Analytics,
119126
// ... other required properties from the spec
120127
})
121128

122129
analytics.track('Order Completed', {
123-
index: "my-index-name",
124-
queryID: "Algolia queryID", // required only for Click Analytics,
130+
search_index: "my-index-name",
125131
products: [
126132
{
127133
product_id: "hit objectID",
134+
queryID: "Algolia queryID",
128135
// ... other required properties from the spec
129136
},
130137
// ...

0 commit comments

Comments
 (0)