Algolia Insights Destination

Algolia Insights lets you push events related to how your product is being used. Sending those events is a required step for using several Algolia features:

  • Click and conversion analytics
  • A/B Testing
  • AI Re-Ranking
  • Personalization
  • Algolia Recommend

This destination is maintained by Algolia. For any issues with the destination, contact the Algolia team.

This document is about a destination which is in beta

This means that the Algolia Insights Destination is in active development, and some functionality may change before it becomes generally available.

Getting Started

Destination Info
Components
Connection Modes
Device-mode Cloud-mode
Web Web
Mobile Mobile
Server Server
  1. From the Segment web app, click Catalog.
  2. Search for “Algolia” in the Catalog, select it, and choose which of your sources to connect the destination to.
  3. Enter the “App ID” & “API Key” into your Segment Settings UI which you can find on the Algolia Dashboard, under API Keys menu.

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.

You can read more about how to send Algolia-related data to Segment from the documentation at Algolia.

Track

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

Algolia supports the following six events from Segment’s Ecommerce Spec.

Supported Events Description
Product List Viewed Fire this event when a visitor views a product list or category.
Product List Filtered Fire this event when a visitor filters a product list or category.
Product Viewed Fire this event when a visitor views a product.
Product Clicked Fire this event when a visitor clicks a product.
Product Added Fire this event when a visitor adds a product to their shopping cart.
Order Completed Fire this event whenever an order/transaction was successfully completed by the customer.

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

analytics.track('Product List Viewed', {
    index: "my-index-name",
    queryID: "Algolia queryID", // required only for Click Analytics,
    products: [{
        objectID: "hit objectID",
        // ... other required properties from the spec
    }]
})

analytics.track('Product List Filtered', {
    index: "my-index-name",
    filters: [
        { type : "free_delivery", value: "true" }
    ],
    // ... other required properties from the spec
})

analytics.track('Product Viewed', {
    objectID: "hit objectID",
    index: "my-index-name",
    queryID: "Algolia queryID", // required only for Click Analytics,
    // ... other required properties from the spec
})


analytics.track('Product Clicked', {
    objectID: "hit objectID",
    position: hitPositionOnIndex, // number
    index: "my-index-name",
    queryID: "Algolia queryID", // required only for Click Analytics,
    // ... other required properties from the spec
})

analytics.track('Product Added', {
    objectID: "hit objectID",
    index: "my-index-name",
    queryID: "Algolia queryID", // required only for Click Analytics,
    // ... other required properties from the spec
})

analytics.track('Order Completed', {
    index: "my-index-name",
    queryID: "Algolia queryID", // required only for Click Analytics,
    products: [
        {
            objectID: "hit objectID",
            // ... other required properties from the spec
        },
        // ...
    ]
})

Track calls will be sent to Algolia as a track event, and appear in your Click Analytics, A/B Testing and Personalization dashboard.

NOTE: If you send anonymous activity to Algolia, it will not be connected to activity attributed to that same user once they are identified.

Renaming Events

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.

Go to the destination settings and click “Rename Events”.

Destination Settings

You can put your current event names on the left and the event names following the spec on the right.

Rename Events

This page was last modified: 22 Jan 2022



Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
or
Create free account