Skip to content

Commit f127af8

Browse files
markzegarelliBeatrice Parfaitwwalser
authored
Algolia Insights doc update deploy PR (#4563)
* chore: remove references to event renaming * chore: add details about clickAnalytics * docs: add images for api keys remove irrelevant sentence * Edits --------- Co-authored-by: Beatrice Parfait <[email protected]> Co-authored-by: Wesley Walser <[email protected]>
1 parent 59d5395 commit f127af8

File tree

8 files changed

+34
-58
lines changed

8 files changed

+34
-58
lines changed

.github/styles/Vocab/Docs/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Aampe
2222
adset
2323
Adwords
2424
Aircall
25+
Algolia
2526
allowlist
2627
Amberflo
2728
API(:?s)
1.21 MB
Loading
501 KB
Loading
1.48 MB
Loading
814 KB
Loading
208 KB
Loading
202 KB
Loading

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

Lines changed: 33 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ beta: true
55
redirect_from: '/connections/destinations/catalog/algolia/'
66
id: 5d373a350abf930001a6b70f
77
---
8-
[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:
99

1010
- Click and conversion analytics
1111
- A/B Testing
@@ -24,31 +24,50 @@ This destination is maintained by [Algolia](https://www.algolia.com/). For any i
2424
2. Search for "Algolia" in the Catalog, select it, and choose which of your sources to connect the destination to.
2525
3. Enter the "App ID" & "API Key" into your Segment Settings UI which you can find on the Algolia Dashboard, under API Keys menu.
2626

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.
2828

29+
![Application Dropdown](images/algolia_app_id_dropdown.png)
2930

30-
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.
3132

33+
![Dashboard Settings](images/algolia_dashboard_settings.png)
34+
35+
![Settings Menu](images/algolia_settings_menu.png)
36+
37+
![Api Keys](images/algolia_api_keys.png)
38+
39+
> info ""
40+
> 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+
![Mappings Tab](images/mapping_tab.png)
57+
58+
![Edit Mappings](images/mapping_tab_edit.png)
3259

3360
## Track
3461

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

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/).
3865

3966
<table>
4067
<tr>
4168
<td>Supported Events</td>
4269
<td>Description</td>
4370
</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>
5271
<tr>
5372
<td><code>Product Viewed</code></td>
5473
<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/
5776
<td><code>Product Clicked</code></td>
5877
<td>Fire this event when a visitor clicks a product.</td>
5978
</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>
6479
<tr>
6580
<td><code>Order Completed</code></td>
6681
<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/
7085
For a full list of required properties for each event type, see the [Spec: V2 Ecommerce Events](/docs/connections/spec/ecommerce/v2/)
7186

7287
```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-
9088
analytics.track('Product Viewed', {
9189
objectID: "hit objectID",
9290
index: "my-index-name",
9391
queryID: "Algolia queryID", // required only for Click Analytics,
9492
// ... other required properties from the spec
9593
})
9694

97-
9895
analytics.track('Product Clicked', {
9996
objectID: "hit objectID",
10097
position: hitPositionOnIndex, // number
@@ -103,13 +100,6 @@ analytics.track('Product Clicked', {
103100
// ... other required properties from the spec
104101
})
105102

106-
analytics.track('Product Added', {
107-
objectID: "hit objectID",
108-
index: "my-index-name",
109-
queryID: "Algolia queryID", // required only for Click Analytics,
110-
// ... other required properties from the spec
111-
})
112-
113103
analytics.track('Order Completed', {
114104
index: "my-index-name",
115105
queryID: "Algolia queryID", // required only for Click Analytics,
@@ -123,20 +113,5 @@ analytics.track('Order Completed', {
123113
})
124114
```
125115

126-
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".
137-
138-
![Destination Settings](images/destination_settings.png)
139-
140-
You can put your current event names on the left and the event names following the spec on the right.
141-
142-
![Rename Events](images/rename_events.png)
116+
> info ""
117+
> 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)