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
[Algolia Insights](https://www.algolia.com/products/analytics/)lets you push events related to how your product is being used. Sending those events is a required step for using several Algolia features:
8
+
This [Algolia Insights](https://www.algolia.com/products/analytics/)destination is a means of facilitating sending [Insights Events](https://www.algolia.com/doc/guides/sending-events/getting-started/). Sending these events is a required step for using several Algolia features:
9
9
10
10
- Click and conversion analytics
11
11
- A/B Testing
@@ -24,31 +24,50 @@ This destination is maintained by [Algolia](https://www.algolia.com/). For any i
24
24
2. Search for "Algolia" in the Catalog, select it, and choose which of your sources to connect the destination to.
25
25
3. Enter the "App ID" & "API Key" into your Segment Settings UI which you can find on the Algolia Dashboard, under API Keys menu.
26
26
27
-
_**NOTE:** The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to send additional Algolia-related data like index name, queryID, etc._
27
+
To find your App ID, there are two options. You can find the App Id in the Application dropdown in the Dashboard.
You can read more about how to send Algolia-related data to Segment from [the documentation at Algolia](https://www.algolia.com/doc/guides/sending-events/implementing/connectors/segment/).
31
+
The other location is where you will also find your API Keys. You can find your API Keys in your settings under API Keys, you will need a Search API Key to set up the Destination in Segment.
> The Algolia Insights Destination is not a plug-and-play integration. It requires you to modify your frontend code to end additional Algolia-related data like index name or queryID.
41
+
42
+
To access your queryID, make sure clickAnalytics are enabled in your search event. If you're using Insights.js this will look like
43
+
```js
44
+
index.search('query', {
45
+
userToken:'user-1',
46
+
clickAnalytics:true
47
+
})
48
+
```
49
+
50
+
Once this is enabled you will be able to send properties like queryId in your segment events. You can read more about how to send Algolia-related data to Segment from [the documentation at Algolia](https://www.algolia.com/doc/guides/sending-events/implementing/connectors/segment/).
51
+
52
+
## Mapping Events
53
+
54
+
By default, Algolia has set up mappings for Product Clicked, Product Viewed and Order Completed events. If your event structure doesn't match [Segments V2 Ecommerce Spec](/docs/connections/spec/ecommerce/v2/) you can update this by using the Mapping Tab.
55
+
56
+

57
+
58
+

32
59
33
60
## Track
34
61
35
62
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does.
36
63
37
-
Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/).
64
+
Algolia supports the following events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/).
38
65
39
66
<table>
40
67
<tr>
41
68
<td>Supported Events</td>
42
69
<td>Description</td>
43
70
</tr>
44
-
<tr>
45
-
<td><code>Product List Viewed</code></td>
46
-
<td>Fire this event when a visitor views a product list or category.</td>
47
-
</tr>
48
-
<tr>
49
-
<td><code>Product List Filtered</code></td>
50
-
<td>Fire this event when a visitor filters a product list or category.</td>
51
-
</tr>
52
71
<tr>
53
72
<td><code>Product Viewed</code></td>
54
73
<td>Fire this event when a visitor views a product.</td>
@@ -57,10 +76,6 @@ Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/
57
76
<td><code>Product Clicked</code></td>
58
77
<td>Fire this event when a visitor clicks a product.</td>
59
78
</tr>
60
-
<tr>
61
-
<td><code>Product Added</code></td>
62
-
<td>Fire this event when a visitor adds a product to their shopping cart.</td>
63
-
</tr>
64
79
<tr>
65
80
<td><code>Order Completed</code></td>
66
81
<td>Fire this event whenever an order/transaction was successfully completed by the customer.</td>
@@ -70,31 +85,13 @@ Algolia supports the following six events from Segment's [Ecommerce Spec](/docs/
70
85
For a full list of required properties for each event type, see the [Spec: V2 Ecommerce Events](/docs/connections/spec/ecommerce/v2/)
71
86
72
87
```js
73
-
analytics.track('Product List Viewed', {
74
-
index:"my-index-name",
75
-
queryID:"Algolia queryID", // required only for Click Analytics,
76
-
products: [{
77
-
objectID:"hit objectID",
78
-
// ... other required properties from the spec
79
-
}]
80
-
})
81
-
82
-
analytics.track('Product List Filtered', {
83
-
index:"my-index-name",
84
-
filters: [
85
-
{ type :"free_delivery", value:"true" }
86
-
],
87
-
// ... other required properties from the spec
88
-
})
89
-
90
88
analytics.track('Product Viewed', {
91
89
objectID:"hit objectID",
92
90
index:"my-index-name",
93
91
queryID:"Algolia queryID", // required only for Click Analytics,
Track calls will be sent to Algolia as a `track` event, and appear in your Click Analytics, A/B Testing and Personalization dashboard.
127
-
128
-
129
-
_**NOTE:** If you send anonymous activity to Algolia, it will not be connected to activity attributed to that same user once they are identified._
130
-
131
-
132
-
## Renaming Events
133
-
134
-
If you are already sending events of which the names are out of the spec, you need to rename them for Algolia to understand correctly. It doesn't necessarily mean you need to modify your code.
135
-
136
-
Go to the destination settings and click "Rename Events".
0 commit comments