Skip to content

Send Algolia click events via search-insights #401

Description

@zigzagdev

Description

The Algolia dashboard's Analytics tab shows "No tracked searches" for Click-through Rate, Conversion Rate, and No Clicks Rate. No click tracking implementation (search-insights, clickAnalytics, queryID) exists anywhere in this codebase currently.

Without click events, there's no way to measure whether search results are actually useful to users (CTR, conversion, no-clicks rate), which makes it impossible to data-drive any future Algolia ranking/Rules tuning.

Changes needed (frontend)

  • Add Algolia's official search-insights library.
  • When a user clicks a search result, send a click event including: queryID (returned by the backend search API — see backend follow-up below), the result's Algolia objectID, and its position in the result list.
  • Initialize search-insights with the same Algolia App ID / Search API key used for search.

Dependency

Backend needs to surface queryID and each hit's objectID in the /api/v1/heritages/search response first — tracked in zigzagdev/world-heritage-api#486.

Acceptance Criteria

  • Clicking a search result sends a click event to Algolia Insights.
  • Confirmed in the Algolia dashboard (Analytics tab) that Click-through Rate / No Clicks Rate start showing real data instead of "No tracked searches".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions