Skip to content

Conversation

@pwizla
Copy link
Collaborator

@pwizla pwizla commented Dec 4, 2025

This PR improves Meilisearch analytics by binding search requests to a monthly rotating, pseudonymous user ID while respecting Do Not Track:

  • Generates/stores msUserId in localStorage and rotates monthly (UTC)
  • Sends X-MS-USER-ID only on Meilisearch /indexes/*/search requests; no personally identifiable information
  • Honors Do No Track (no ID created/sent) and restores fetch on unmount
  • Updates the “Usage information” page to disclose metrics and the identifier with a note
  • Click/conversion events are out of scope and unchanged

@pwizla pwizla self-assigned this Dec 4, 2025
@pwizla pwizla requested a review from meganelacheny as a code owner December 4, 2025 15:31
@strapi-cla
Copy link

strapi-cla commented Dec 4, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ pwizla
❌ web-flow
You have signed the CLA already but the status is still pending? Let us recheck it.

@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
documentation Ready Ready Preview Comment Dec 5, 2025 3:10pm

@github-actions github-actions bot added internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Dec 4, 2025
Only useful for later Docusaurus upgrades
…R-ID; add root API proxy; forward Meilisearch host/key via headers\n\n- Add api/indexes/[indexUid]/search.js to proxy POST /api/indexes/:indexUid/search to Meilisearch and set X-MS-USER-ID server-side\n- Keep host/apiKey in docusaurus.config.js but pass via headers (X-Meili-Host, X-Meili-Api-Key) to avoid literals in server code\n- Update SearchBar to use same-origin /api host; respect DNT and monthly rotation for msUserId\n- Restore search UI while enabling user-bound analytics without CORS issues
@pwizla pwizla added the flag: don't merge This PR should not be merged at the moment label Dec 5, 2025
…trapi-docs/search\n\n- Remove duplicate function under docusaurus/api\n- Replace dynamic [indexUid] route with fixed strapi-docs path to match our single index\n- Keep header-forwarded host/key and X-MS-USER-ID support
@pwizla pwizla removed the flag: don't merge This PR should not be merged at the moment label Dec 9, 2025
@pwizla pwizla merged commit 7ada99f into main Dec 9, 2025
3 of 5 checks passed
@pwizla pwizla deleted the repo/fix-meilisearch-analytics branch December 9, 2025 15:15
@pwizla pwizla added this to the 6.14.0 milestone Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: updated content PRs updating existing documentation content source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants