Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Algolia Insights (Actions) Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as Algolia Insights (Actions) in the Integrations object
  • This integration is partner owned. Please reach out to the partner's support for any issues.

With the Algolia Insights (Actions) destination, you can send Insights Events(link takes you to an external page). Insight Events are required to use these Algolia features:

This destination is maintained by Algolia(link takes you to an external page). For any issues with the destination, contact the Algolia team.


Getting Started

getting-started page anchor
  1. From the Destinations catalog page in the Segment App, click Add Destination.
  2. Search for Algolia in the Destinations Catalog and select the Algolia Insights (Actions) destination.
  3. Choose which Source should send data to the Algolia destination.
  4. Sign in to the Algolia dashboard(link takes you to an external page) and retrieve your App ID and API Key for the application you'd like to connect. See Getting your Algolia credentials below for details on where to get these values.
  5. Enter the App ID and API Key in the Algolia destination settings in Segment.

Getting your Algolia credentials

getting-your-algolia-credentials page anchor

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.

Dashboard Settings.
Settings Menu.
Api Keys.

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, you can update this in the destination mappings section of the Segment app.

Mappings Tab.

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(link takes you to an external page).


If you're not familiar with the Segment spec, take a look to understand what the Track method does.

Algolia supports the following Segment events out of the box:

Supported EventsDescription
Product List FilteredSend this event when a visitor filters a product list or category.
Product List ViewedSend this event when a visitor views a product list or category.
Product ViewedFire this event when a visitor views a product.
Product ClickedFire this event when a visitor clicks a product.
Product AddedFire this event when a visitor adds a product to their shopping cart.
Order CompletedFire this event whenever an order/transaction was successfully completed by the customer.

For a full list of required properties for each event type, see Spec: V2 Ecommerce Events

1
analytics.track('Product List Filtered', {
2
search_index: "my-index-name",
3
filters: [
4
{
5
attribute: "color",
6
value: "yellow",
7
}
8
],
9
query_id: "Algolia queryID", // required only for Click Analytics,
10
// ... other required properties from the spec
11
})
12
13
analytics.track('Product List Viewed', {
14
search_index: "my-index-name",
15
products: [
16
{
17
product_id: "hit objectID",
18
},
19
{
20
product_id: "hit objectID 2",
21
},
22
],
23
query_id: "Algolia queryID", // required only for Click Analytics,
24
// ... other required properties from the spec
25
})
26
27
analytics.track('Product Viewed', {
28
search_index: "my-index-name",
29
product_id: "hit objectID",
30
query_id: "Algolia queryID", // required only for Click Analytics,
31
// ... other required properties from the spec
32
})
33
34
analytics.track('Product Clicked', {
35
search_index: "my-index-name",
36
product_id: "hit objectID",
37
position: hitPositionOnIndex, // number
38
query_id: "Algolia queryID", // required only for Click Analytics,
39
// ... other required properties from the spec
40
})
41
42
// This
43
analytics.track('Product Added', {
44
search_index: "my-index-name",
45
product_id: "hit objectID",
46
query_id: "Algolia queryID", // required only for Click Analytics,
47
// ... other required properties from the spec
48
})
49
50
analytics.track('Order Completed', {
51
search_index: "my-index-name",
52
products: [
53
{
54
product_id: "hit objectID",
55
queryID: "Algolia queryID",
56
// ...
57
},
58
// ... other required properties from the spec
59
]
60
})
(information)

Info

If you send anonymous activity to Algolia, Algolia does not connect it to activity attributed to that same user once they are identified.


You can send computed traits and audiences generated using Engage to this destination as a user property. To learn more about Engage, schedule a demo(link takes you to an external page).

For user-property destinations, an identify call is sent to the destination for each user being added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property order_completed_last_30days: true. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to false.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

(information)

Real-time to batch destination sync frequency

Real-time audience syncs to Algolia Insights (Actions) may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
apiKeystring
required

An API key which has write permissions to the Algolia Insights API


appIdstring
required

Your Algolia Application ID.


QueryID QueryString Namestring

Optional

QueryString name you use for when storing the Algolia QueryID in a page URL.

Default: queryID