You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/destinations/catalog/actions-algolia-insights/index.md
+20-13Lines changed: 20 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,9 @@ Your app ID and API key can be found in the **API Keys** section of your account
35
35
36
36
### Algolia-related data
37
37
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.
39
39
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:
41
41
42
42
```js
43
43
index.search('query', {
@@ -60,7 +60,7 @@ By default, Algolia has set up mappings for `Product List Filtered`, `Product Cl
60
60
61
61
If you're not familiar with the Segment spec, take a look to understand what the [Track method](/docs/connections/spec/track/) does.
62
62
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:
64
64
65
65
<table>
66
66
<tr>
@@ -93,38 +93,45 @@ For a full list of required properties for each event type, see [Spec: V2 Ecomme
93
93
94
94
```js
95
95
analytics.track('Product List Filtered', {
96
-
index:"my-index-name",
96
+
search_index:"my-index-name",
97
97
filters: [
98
98
{
99
99
attribute:"color",
100
100
value:"yellow",
101
101
}
102
102
],
103
-
queryID:"Algolia queryID", // required only for Click Analytics,
103
+
query_id:"Algolia queryID", // required only for Click Analytics,
104
104
// ... other required properties from the spec
105
105
})
106
106
107
107
analytics.track('Product Clicked', {
108
-
index:"my-index-name",
109
-
objectID:"hit objectID",
108
+
search_index:"my-index-name",
109
+
product_id:"hit objectID",
110
110
position: hitPositionOnIndex, // number
111
-
queryID:"Algolia queryID", // required only for Click Analytics,
111
+
query_id:"Algolia queryID", // required only for Click Analytics,
112
112
// ... other required properties from the spec
113
113
})
114
114
115
115
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,
119
126
// ... other required properties from the spec
120
127
})
121
128
122
129
analytics.track('Order Completed', {
123
-
index:"my-index-name",
124
-
queryID:"Algolia queryID", // required only for Click Analytics,
0 commit comments