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
+47-16Lines changed: 47 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,15 @@ redirect_from:
5
5
- '/connections/destinations/catalog/algolia/'
6
6
id: 63e52bea7747fbc311d5b872
7
7
---
8
-
With the [Algolia Insights (Actions)](https://www.algolia.com/products/analytics/){:target="_blank"} destination, you can send [Insights Events](https://www.algolia.com/doc/guides/sending-events/getting-started/){:target="_blank"}. It's required to send Insight Events to use these Algolia features:
8
+
With the Algolia Insights (Actions)destination, you can send [Insights Events](https://www.algolia.com/doc/guides/sending-events/getting-started/){:target="_blank"}. Insight Events are required to use these Algolia features:
9
9
10
-
- Click and conversion analytics
11
-
- A/B Testing
12
-
- AI Re-Ranking
13
-
- Personalization
14
-
- Algolia Recommend
10
+
-[Click and conversion analytics](https://www.algolia.com/doc/guides/search-analytics/overview/){:target="_blank"}
This destination is maintained by [Algolia](https://www.algolia.com/){:target="_blank”}. For any issues with the destination, [contact the Algolia team](mailto:[email protected]).
17
19
@@ -25,7 +27,7 @@ This destination is maintained by [Algolia](https://www.algolia.com/){:target="_
25
27
26
28
### Getting your Algolia credentials
27
29
28
-
Your app ID and API key can be found in the **API Keys** section of your account settings in the Algolia dashboard. You will need a **search** API key to set up the destination.
30
+
Your app ID and API key can be found in the **API Keys** section of your account settings in the Algolia dashboard. You need a **search** API key to set up the destination.
@@ -37,13 +39,19 @@ Your app ID and API key can be found in the **API Keys** section of your account
37
39
38
40
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
41
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:
42
+
To access your query ID, make sure [`clickAnalytics`](https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics/){:target="_blank"} is enabled in your searches. If you're using the [JavaScript v5 search API client](https://www.algolia.com/doc/libraries/javascript/v5/methods/search/search-single-index/?client=javascript){:target="_blank"}, this looks like:
Once this is enabled, you will be able to access `queryID` in your search response, which you can then use in your Segment events.
@@ -52,10 +60,14 @@ You can read more about how to send Algolia-related data to Segment in the [Algo
52
60
53
61
## Mapping Events
54
62
55
-
By default, Algolia has set up mappings for `Product List Filtered`, `Product Clicked`, `Product Viewed`, `Product Added` and `Order Completed` events. If your event structure doesn't match Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/), you can update this in the destination mappings section of the Segment app.
63
+
By default, Algolia has set up mappings for `Product List Filtered`, `Product List Viewed`, `Product Viewed`, `Product Clicked`, `Product Added` and `Order Completed` events. If your event structure doesn't match Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/), you can update this in the destination mappings section of the Segment app.
56
64
57
65

58
66
67
+
### User identifiers
68
+
69
+
When mapping user identifiers, Algolia recommends using the **Authenticated User Token** field to map authenticated user IDs and the **User Token** field for anonymous user IDs. For more detail, see the [Algolia documentation](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/#persistent-user-token){:target="_blank"}.
70
+
59
71
## Track
60
72
61
73
If you're not familiar with the Segment spec, take a look to understand what the [Track](/docs/connections/spec/track/) method does.
@@ -72,13 +84,17 @@ Algolia supports the following Segment events out of the box:
72
84
<td>Send this event when a visitor filters a product list or category.</td>
73
85
</tr>
74
86
<tr>
75
-
<td><code>Product Clicked</code></td>
76
-
<td>Fire this event when a visitor clicks a product.</td>
87
+
<td><code>Product List Viewed</code></td>
88
+
<td>Send this event when a visitor views a product list or category.</td>
77
89
</tr>
78
90
<tr>
79
91
<td><code>Product Viewed</code></td>
80
92
<td>Fire this event when a visitor views a product.</td>
81
93
</tr>
94
+
<tr>
95
+
<td><code>Product Clicked</code></td>
96
+
<td>Fire this event when a visitor clicks a product.</td>
97
+
</tr>
82
98
<tr>
83
99
<td><code>Product Added</code></td>
84
100
<td>Fire this event when a visitor adds a product to their shopping cart.</td>
@@ -104,10 +120,16 @@ analytics.track('Product List Filtered', {
104
120
// ... other required properties from the spec
105
121
})
106
122
107
-
analytics.track('Product Clicked', {
123
+
analytics.track('Product List Viewed', {
108
124
search_index:"my-index-name",
109
-
product_id:"hit objectID",
110
-
position: hitPositionOnIndex, // number
125
+
products: [
126
+
{
127
+
product_id:"hit objectID",
128
+
},
129
+
{
130
+
product_id:"hit objectID 2",
131
+
},
132
+
],
111
133
query_id:"Algolia queryID", // required only for Click Analytics,
0 commit comments