Add community blog: Lighting Up the Black Box: Implementing Privacy-First User Analytics in AMRIT (C4GT 2025) - #37
Add community blog: Lighting Up the Black Box: Implementing Privacy-First User Analytics in AMRIT (C4GT 2025)#37abhijeetw035 wants to merge 5 commits into
Conversation
…irst User Analytics in AMRIT (C4GT 2025)
WalkthroughAdds a new MDX blog post documenting the implementation of privacy-first analytics with Matomo for the AMRIT platform, covering goals, architecture (gateway, NGINX reverse proxy, private Matomo), a reusable TrackingService for Angular UIs, a three-phase rollout, KPIs/dashboards, and lessons learned. No code changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser as Browser (Angular UI)
participant TrackingSvc as TrackingService (Common-UI)
participant PublicGW as Public Gateway
participant NGX as NGINX Gateway / Reverse Proxy
participant Matomo as Private Matomo Server
Browser->>TrackingSvc: emit event (pageview / custom)
TrackingSvc->>PublicGW: send event payload
Note right of PublicGW `#e6f2ff`: edge layer — rate-limit, TLS
PublicGW->>NGX: forward request
Note right of NGX `#f0fff0`: routing, auth, header enforcement
NGX->>Matomo: deliver tracking request
Matomo-->>NGX: 2xx / metrics stored
NGX-->>PublicGW: proxy response
PublicGW-->>TrackingSvc: ack
TrackingSvc-->>Browser: complete
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🪛 LanguageToolsrc/content/blog/implement-matomo.mdx[uncategorized] ~16-~16: Consider adding a comma here to clarify the structure of the sentence. (PRP_COMMA) [uncategorized] ~29-~29: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) [uncategorized] ~37-~37: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) [uncategorized] ~92-~92: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) [uncategorized] ~93-~93: Possible missing article found. (AI_HYDRA_LEO_MISSING_A) [uncategorized] ~147-~147: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) [uncategorized] ~153-~153: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) [uncategorized] ~159-~159: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA) 🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
src/content/blog/implement-matomo.mdx (3)
28-28: Fix missing punctuation between clauses.Line 28 reads "But it had one big problem a black box." Missing punctuation creates ambiguity. Use an em-dash or colon for clarity.
-But it had one big problem a **black box**. +But it had one big problem — a **black box**.
48-48: Reconsider bolding mid-sentence question words.Bolding "why" in "My first thought was why not just use Google Analytics?" is unconventional styling. Consider restructuring to improve readability.
-My first thought was **why** not just use Google Analytics? +My first thought: **Why not just use Google Analytics?**
52-52: Improve spacing between bold segments.Line 52 has two consecutive bold phrases: "full data ownership nothing leaves your server." Consider separating with punctuation or restructuring.
-Unlike others, Matomo gives **full data ownership** **nothing leaves your server**. +Unlike others, Matomo gives **full data ownership** — **nothing leaves your server**.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (9)
public/images/posts/abhijeet-c4gt-certificate.jpgis excluded by!**/*.jpgpublic/images/posts/amrit-repo.pngis excluded by!**/*.pngpublic/images/posts/kpis.pngis excluded by!**/*.pngpublic/images/posts/matomo-architecture.pngis excluded by!**/*.pngpublic/images/posts/matomo-banner.pngis excluded by!**/*.pngpublic/images/posts/matomo-dashboard.pngis excluded by!**/*.pngpublic/images/posts/matomo.pngis excluded by!**/*.pngpublic/images/posts/pull-requests.pngis excluded by!**/*.pngpublic/images/posts/server-architecture.pngis excluded by!**/*.png
📒 Files selected for processing (1)
src/content/blog/implement-matomo.mdx(1 hunks)
🔇 Additional comments (1)
src/content/blog/implement-matomo.mdx (1)
11-173: Content and narrative quality look strong.The blog post is well-structured, engaging, and effectively communicates the technical implementation while maintaining a personal narrative voice. The progression from problem statement through architecture design to outcomes is logical and compelling. Good use of headings, visuals, and storytelling for a technical blog post.
| ## The Challenge: Why Analytics in Healthcare Is Hard (and Why We Chose Matomo) | ||
|
|
||
| My first thought was **why not just use Google Analytics?** | ||
| But **healthcare data is sensitive**, and every click could carry **confidential context**. Sending that to **third-party tools was not an option**. |
There was a problem hiding this comment.
This is not correct. Even with Matomo, we shouldn't be sending health data anywhere.
We chose Matomo to remove any third-party dependencies and to host an open-source product in-house.
Anyway this detail can be omitted.
There was a problem hiding this comment.
yes was Got it . the intent was to highlight our focus on privacy and self hosting, not to imply we track any health-related data. I’ll reword that line accordingly to avoid confusion.
|
|
||
| My goal was simple yet crucial **light up that black box**. | ||
|
|
||
|  |
There was a problem hiding this comment.
Quite repetitive and these images are not needed.
|
|
||
| #### 🔹 The Server Architecture: Privacy by Design | ||
|
|
||
| You can't just expose a Matomo server to the public internet that's a **security risk**. |
There was a problem hiding this comment.
Meaning?
The matomo URL is still public, right?
There was a problem hiding this comment.
Right the Matomo instance is accessible via DNS, but all analytics data resides on a private internal server. I’ll update the line to reflect that clearly. Thanks for catching it!
|
|
||
| --- | ||
|
|
||
|  |
There was a problem hiding this comment.
Yeah fine 😄 I took that format from my Medium blog, but I’ll remove it here.
|
Made the required changes. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/content/blog/implement-matomo.mdx (1)
28-28: Minor: Fix missing commas and articles for grammatical consistency.The LanguageTool static analysis has flagged several missing commas and one missing article that impact sentence clarity:
Apply this diff to address the grammatical issues:
- But it had one big problem a **black box**. + But it had one big problem: a **black box**. - Our tools told us if servers were running not **how** people used them. + Our tools told us if servers were running, not **how** people used them. - AMRIT isn't a single app it's a **network of Angular-based UIs**. + AMRIT isn't a single app; it's a **network of Angular-based UIs**. - Adding tracking code manually to each one would've been + Adding tracking code manually to each one would've been a - By the end, the black box was gone replaced by a **clear, measurable, and + By the end, the black box was gone—replaced by a **clear, measurable, and - This project was more than just integrating analytics it was a **crash course in scale, secur + This project was more than just integrating analytics; it was a **crash course in scale, secur - Most importantly, I realized that **great engineering isn't just about code it's about solving real problems for re + Most importantly, I realized that **great engineering isn't just about code—it's about solving real problems for reAlso applies to: 36-36, 91-91, 146-146, 152-152, 158-158
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/content/blog/implement-matomo.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/blog/implement-matomo.mdx
[uncategorized] ~15-~15: Consider adding a comma here to clarify the structure of the sentence.
Context: ...t impacts real people. ✨ --- ## About Me I'm Abhijeet Waghmare, a **pre-fina...
(PRP_COMMA)
[uncategorized] ~28-~28: Possible missing comma found.
Context: ...ies** across India. But it had one big problem a black box. Despite its scale, AM...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~36-~36: Possible missing comma found.
Context: ...?"** Our tools told us if servers were running not how people used them. And in ...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~91-~91: Possible missing comma found.
Context: ...on the frontend. AMRIT isn't a single app it's a network of Angular-based UIs...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~92-~92: Possible missing article found.
Context: ...etwork of Angular-based UIs**. Adding tracking code manually to each one would've been...
(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~146-~146: Possible missing comma found.
Context: ...time**.* By the end, the black box was gone replaced by a **clear, measurable, and ...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~152-~152: Possible missing comma found.
Context: ... project was more than just integrating analytics it was a **crash course in scale, secur...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~158-~158: Possible missing comma found.
Context: ...at **great engineering isn't just about code it's about solving real problems for re...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (1)
src/content/blog/implement-matomo.mdx (1)
83-83: Image file issue resolved—no action needed.The image file
/images/posts/server-architecture.pngis now present in the repository atpublic/images/posts/server-architecture.png. The blog post will render correctly without broken image links.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/content/blog/implement-matomo.mdx (1)
1-9: Add missing subtitle field to frontmatter.The frontmatter is missing the
subtitlefield, which is required by repository blog post conventions (confirmed in existing blog posts). This must be added to maintain consistency.Apply this diff to add the subtitle field:
--- title: "Lighting Up the Black Box: Implementing Privacy-First User Analytics in AMRIT (My C4GT 2025 Experience)" author: "Abhijeet Waghmare" +subtitle: "A journey implementing privacy-first analytics with Matomo across AMRIT's healthcare platform" date: 2025-11-08T00:00:00Z categories: ["Frontend", "Analytics"] image: "/images/posts/matomo-banner.png" draft: false featured: true ---
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/content/blog/implement-matomo.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/blog/implement-matomo.mdx
[uncategorized] ~15-~15: Consider adding a comma here to clarify the structure of the sentence.
Context: ...t impacts real people. ✨ --- ## About Me I'm Abhijeet Waghmare, a **pre-fina...
(PRP_COMMA)
[uncategorized] ~28-~28: Possible missing comma found.
Context: ...ies** across India. But it had one big problem a black box. Despite its scale, AM...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~36-~36: Possible missing comma found.
Context: ...?"** Our tools told us if servers were running not how people used them. And in ...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~91-~91: Possible missing comma found.
Context: ...on the frontend. AMRIT isn't a single app it's a network of Angular-based UIs...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~92-~92: Possible missing article found.
Context: ...etwork of Angular-based UIs**. Adding tracking code manually to each one would've been...
(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~146-~146: Possible missing comma found.
Context: ...time**.* By the end, the black box was gone replaced by a **clear, measurable, and ...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~152-~152: Possible missing comma found.
Context: ... project was more than just integrating analytics it was a **crash course in scale, secur...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~158-~158: Possible missing comma found.
Context: ...at **great engineering isn't just about code it's about solving real problems for re...
(AI_HYDRA_LEO_MISSING_COMMA)
🔇 Additional comments (1)
src/content/blog/implement-matomo.mdx (1)
56-143: Verify image count aligns with previous feedback.The past review noted that images were "quite repetitive and not needed." The current post still includes 6 image references across multiple sections (matomo.png, server-architecture.png, matomo-architecture.png, pull-requests.png, kpis.png, matomo-dashboard.png). Clarify whether this count is intentional or if further reduction is expected per the earlier feedback.
|



📋 Description
JIRA ID:
This PR adds a new blog post to the AMRIT Website.
The post covers recent updates and insights related to the project, following the existing blog structure and styling.
To publish new content and keep the blog section up to date with the latest information.
✅ Type of Change
ℹ️ Additional Information
Testing Done:
Summary by CodeRabbit