openedx / openedx/paragon

Ensure Algolia analytics user id matches Segment's anonymous user id

Open
#1,975 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

engineering help wanted
Dominant language
JavaScript
Stars
140
Forks
100
Avg merge
1h 3m
Merged PRs (30d)
30

Description

The Paragon documentation site utilizes DocSearch to provide search functionality to consumers. To track usage, it makes an API call to Algolia's analytics API endpoint here:

https://github.com/openedx/paragon/blob/b3bffd33fc75c7b213f5beada4e383b092d9fa06/www/src/components/Search/HitComponent.jsx#L8-L25

Note that it passes a randomly generated UUID as the userToken in the DocSearch component to take the place of a user id.

Ideally, however, we'd be using the same anonymous id that was generated by Segment as the userToken for Algolia's DocSearch. That way, we can correlate Algolia search events with Segment events across users based on Segment's anonymous id.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with www/src/components/Search/HitComponent.jsx, especially the DocSearch userToken usage at lines 8–25, then locate how the documentation site obtains Segment's anonymous user id. The work is complete when DocSearch uses that same anonymous id for Algolia analytics and the search events can be correlated with Segment events.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
analytics, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.