Ensure Algolia analytics user id matches Segment's anonymous user id
Nobody has claimed this yet.
- 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:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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