[PR #12] [MERGED] Refactor analytics module for GA4 integration #12

Closed
opened 2026-03-04 01:38:07 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tuanngocptn/nport/pull/12
Author: @tuanngocptn
Created: 1/28/2026
Status: Merged
Merged: 1/28/2026
Merged by: @tuanngocptn

Base: mainHead: feat/config-ga4


📝 Commits (2)

  • 7a6f474 Refactor analytics module for GA4 integration
  • 5208ab4 Update CHANGELOG for v2.1.2 release

📊 Changes

3 files changed (+74 additions, -23 deletions)

View changed files

📝 CHANGELOG.md (+11 -1)
📝 src/analytics.ts (+59 -22)
📝 src/types/analytics.ts (+4 -0)

📄 Description

  • Updated analytics configuration to use GA4 with a dedicated data stream for CLI usage tracking.
  • Removed unused randomUUID import and adjusted session ID generation to return a numeric timestamp.
  • Enhanced error handling and console output for analytics initialization and event tracking.
  • Added optional user ID and timestamp in microseconds to the GA4 payload structure.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tuanngocptn/nport/pull/12 **Author:** [@tuanngocptn](https://github.com/tuanngocptn) **Created:** 1/28/2026 **Status:** ✅ Merged **Merged:** 1/28/2026 **Merged by:** [@tuanngocptn](https://github.com/tuanngocptn) **Base:** `main` ← **Head:** `feat/config-ga4` --- ### 📝 Commits (2) - [`7a6f474`](https://github.com/tuanngocptn/nport/commit/7a6f474d8759f4375b21f1ef5a78d743075b295f) Refactor analytics module for GA4 integration - [`5208ab4`](https://github.com/tuanngocptn/nport/commit/5208ab4b8485d0ba85566925652bb6136cfd8aa0) Update CHANGELOG for v2.1.2 release ### 📊 Changes **3 files changed** (+74 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+11 -1) 📝 `src/analytics.ts` (+59 -22) 📝 `src/types/analytics.ts` (+4 -0) </details> ### 📄 Description - Updated analytics configuration to use GA4 with a dedicated data stream for CLI usage tracking. - Removed unused `randomUUID` import and adjusted session ID generation to return a numeric timestamp. - Enhanced error handling and console output for analytics initialization and event tracking. - Added optional user ID and timestamp in microseconds to the GA4 payload structure. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:38:07 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nport#12
No description provided.