ECHO-233 Add plausible-tracker integration and configuration updates#185
ECHO-233 Add plausible-tracker integration and configuration updates#185
Conversation
WalkthroughPlausible analytics was integrated into the frontend by adding the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant PlausibleTracker
User->>App: Load App component
App->>PlausibleTracker: Initialize with domain and API host
App->>PlausibleTracker: enableAutoPageviews()
Note over App,PlausibleTracker: Auto pageview tracking starts
User-->>App: Navigates or closes app
App->>PlausibleTracker: Cleanup analytics tracking on unmount
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
echo/frontend/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
echo/frontend/package.json(1 hunks)echo/frontend/src/App.tsx(1 hunks)echo/frontend/src/config.ts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
echo/frontend/src/App.tsx (2)
echo/frontend/src/config.ts (4)
USE_PARTICIPANT_ROUTER(1-2)PARTICIPANT_BASE_URL(5-6)ADMIN_BASE_URL(3-4)PLAUSIBLE_API_HOST(34-35)echo/frontend/src/Router.tsx (2)
participantRouter(307-347)mainRouter(111-305)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: ci-check-frontend
- GitHub Check: ci-check-server
🔇 Additional comments (3)
echo/frontend/src/config.ts (1)
34-35: LGTM – sensible default with env override.Fallback to the public Plausible cloud is clean, no concerns.
echo/frontend/src/App.tsx (1)
25-36: Plausibledomainparam likely expects a bare host, not a full URL.
ADMIN_BASE_URL/PARTICIPANT_BASE_URLinclude protocol and potentially path, while Plausible docs specify the naked domain (e.g.app.mycorp.com). Passing a full origin can silently drop events.- domain: USE_PARTICIPANT_ROUTER ? PARTICIPANT_BASE_URL : ADMIN_BASE_URL, + domain: USE_PARTICIPANT_ROUTER + ? new URL(PARTICIPANT_BASE_URL).hostname + : new URL(ADMIN_BASE_URL).hostname,Flag for a quick manual test in the network tab.
echo/frontend/package.json (1)
58-58: Dependency pin looks good – remember to mirror in lockfile.
^0.3.9aligns with semver-zero semantics (any minor bump is breaking). Keep an eye on changelogs before the nextnpm update.
…185) Add plausible-tracker integration and configuration updates Co-authored-by: Sameer Pashikanti <63326129+spashii@users.noreply.github.com>
Summary by CodeRabbit