Skip to content

Commit dbb0a2a

Browse files
committed
update wording + missing events [netlify-build]
1 parent 9194d25 commit dbb0a2a

File tree

1 file changed

+66
-42
lines changed
  • src/connections/destinations/catalog/actions-algolia-insights

1 file changed

+66
-42
lines changed

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

Lines changed: 66 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,96 +17,120 @@ This destination is maintained by [Algolia](https://www.algolia.com/){:target="_
1717

1818
## Getting Started
1919

20-
1. From the Segment web app, click **Catalog**.
21-
2. Search for "Algolia" in the Catalog, select it, and choose which of your sources to connect the destination to.
22-
3. Enter the "App ID" & "API Key" into your Segment Settings UI which you can find on the Algolia Dashboard, under API Keys menu.
20+
1. From the Destinations catalog page in the Segment App, click **Add Destination**.
21+
2. Search for **Algolia** in the Destinations Catalog and select the **Algolia Insights (Actions)** destination.
22+
3. Choose which Source should send data to the Algolia destination.
23+
4. Sign in to the [Algolia dashboard](https://dashboard.algolia.com/users/sign_in) and retrieve your **App ID** and **API Key** for the application you'd like to connect. See **[Getting your Algolia credentials](#getting-your-algolia-credentials)** below for details on where to get these values.
24+
5. Enter the **App ID** and **API Key** in the Algolia destination settings in Segment.
2325

24-
To find your App ID, there are two options. You can find the App Id in the Application dropdown in the Dashboard.
26+
### Getting your Algolia credentials
2527

26-
![Application Dropdown](images/algolia_app_id_dropdown.png)
27-
28-
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.
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.
2929

3030
![Dashboard Settings](images/algolia_dashboard_settings.png)
3131

3232
![Settings Menu](images/algolia_settings_menu.png)
3333

3434
![Api Keys](images/algolia_api_keys.png)
3535

36-
> info ""
37-
> 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.
36+
### Algolia-related data
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.
39+
40+
To access your query ID, make sure `clickAnalytics` is enabled in your searches. If you're using Insights.js, this will look like:
3841

39-
To access your queryID, make sure clickAnalytics are enabled in your search event. If you're using Insights.js this will look like
4042
```js
4143
index.search('query', {
4244
userToken: 'user-1',
4345
clickAnalytics: true
4446
})
4547
```
4648

47-
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/){:target="_blank”}.
49+
Once this is enabled, you will be able to access `queryID` in your search response, which you can then use in your Segment events.
50+
51+
You can read more about how to send Algolia-related data to Segment in the [Algolia documentation](https://www.algolia.com/doc/guides/sending-events/connectors/segment/#augment-your-segment-events-with-algolia-related-data){:target="_blank”}.
4852

4953
## Mapping Events
5054

51-
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+
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.
5256

5357
![Mappings Tab](images/mappings_tab.png)
5458

5559
## Track
5660

57-
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does.
61+
If you're not familiar with the Segment spec, take a look to understand what the [Track method](/docs/connections/spec/track/) does.
5862

5963
Algolia supports the following events from Segment's [Ecommerce Spec](/docs/connections/spec/ecommerce/v2/).
6064

6165
<table>
6266
<tr>
63-
<td>Supported Events</td>
64-
<td>Description</td>
67+
<td>Supported Events</td>
68+
<td>Description</td>
69+
</tr>
70+
<tr>
71+
<td><code>Product List Filtered</code></td>
72+
<td>Send this event when a visitor filters a product list or category.</td>
6573
</tr>
6674
<tr>
67-
<td><code>Product Viewed</code></td>
68-
<td>Fire this event when a visitor views a product.</td>
75+
<td><code>Product Clicked</code></td>
76+
<td>Fire this event when a visitor clicks a product.</td>
6977
</tr>
7078
<tr>
71-
<td><code>Product Clicked</code></td>
72-
<td>Fire this event when a visitor clicks a product.</td>
79+
<td><code>Product Viewed</code></td>
80+
<td>Fire this event when a visitor views a product.</td>
7381
</tr>
7482
<tr>
75-
<td><code>Order Completed</code></td>
76-
<td>Fire this event whenever an order/transaction was successfully completed by the customer.</td>
83+
<td><code>Product Added</code></td>
84+
<td>Fire this event when a visitor adds a product to their shopping cart.</td>
85+
</tr>
86+
<tr>
87+
<td><code>Order Completed</code></td>
88+
<td>Fire this event whenever an order/transaction was successfully completed by the customer.</td>
7789
</tr>
7890
</table>
7991

80-
For a full list of required properties for each event type, see the [Spec: V2 Ecommerce Events](/docs/connections/spec/ecommerce/v2/)
92+
For a full list of required properties for each event type, see [Spec: V2 Ecommerce Events](/docs/connections/spec/ecommerce/v2/)
8193

8294
```js
83-
analytics.track('Product Viewed', {
84-
objectID: "hit objectID",
85-
index: "my-index-name",
86-
queryID: "Algolia queryID", // required only for Click Analytics,
87-
// ... other required properties from the spec
95+
analytics.track('Product List Filtered', {
96+
index: "my-index-name",
97+
filters: [
98+
{
99+
attribute: "color",
100+
value: "yellow",
101+
}
102+
],
103+
queryID: "Algolia queryID", // required only for Click Analytics,
104+
// ... other required properties from the spec
88105
})
89106

90107
analytics.track('Product Clicked', {
91-
objectID: "hit objectID",
92-
position: hitPositionOnIndex, // number
93-
index: "my-index-name",
94-
queryID: "Algolia queryID", // required only for Click Analytics,
95-
// ... other required properties from the spec
108+
index: "my-index-name",
109+
objectID: "hit objectID",
110+
position: hitPositionOnIndex, // number
111+
queryID: "Algolia queryID", // required only for Click Analytics,
112+
// ... other required properties from the spec
113+
})
114+
115+
analytics.track('Product Viewed', {
116+
index: "my-index-name",
117+
objectID: "hit objectID",
118+
queryID: "Algolia queryID", // required only for Click Analytics,
119+
// ... other required properties from the spec
96120
})
97121

98122
analytics.track('Order Completed', {
99-
index: "my-index-name",
100-
queryID: "Algolia queryID", // required only for Click Analytics,
101-
products: [
102-
{
103-
objectID: "hit objectID",
104-
// ... other required properties from the spec
105-
},
106-
// ...
107-
]
123+
index: "my-index-name",
124+
queryID: "Algolia queryID", // required only for Click Analytics,
125+
products: [
126+
{
127+
product_id: "hit objectID",
128+
// ... other required properties from the spec
129+
},
130+
// ...
131+
]
108132
})
109133
```
110134

111135
> info ""
112-
> If you send anonymous activity to Algolia, Algolia does not connect it to activity attributed to that same user once they are identified.
136+
> If you send anonymous activity to Algolia, Algolia does not connect it to activity attributed to that same user once they are identified.

0 commit comments

Comments
 (0)