build: update plausible-client - #246
Conversation
📝 WalkthroughWalkthroughCustom analytics modules for engagement tracking, click tracking, and session scoring have been removed. The plausible-client dependency has been upgraded from v1.5.0 to v2.0.0. Analytics initialization in index.ts has been refactored to import and use these capabilities directly from the upgraded plausible-client library instead of maintaining custom implementations. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~35 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Cloudflare Pages DeploymentEvent Name: pull_request Wrangler Output⛅️ wrangler 4.71.0 🌎 Deploying... |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/site/src/components/analytics/index.ts`:
- Around line 42-43: The enableLinkClicksCapture call is redundant and conflicts
with enableAutoOutboundTracking, causing duplicate events; remove the
enableLinkClicksCapture(plausible, { captureText: true }) line (or alternatively
change it to include the same-origin filter used by enableAutoOutboundTracking)
so only one click tracker reports outbound clicks; locate the calls to
enableAutoOutboundTracking and enableLinkClicksCapture in this file and delete
or adjust the enableLinkClicksCapture invocation accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0a83053a-54e8-48a6-b3f8-305d5c2f6edb
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (6)
packages/site/package.jsonpackages/site/src/components/analytics/EngagementTimeTracker.tspackages/site/src/components/analytics/enableClickTracking.tspackages/site/src/components/analytics/enableEngagementTracking.tspackages/site/src/components/analytics/enableSessionScoring.tspackages/site/src/components/analytics/index.ts
💤 Files with no reviewable changes (4)
- packages/site/src/components/analytics/enableSessionScoring.ts
- packages/site/src/components/analytics/enableClickTracking.ts
- packages/site/src/components/analytics/EngagementTimeTracker.ts
- packages/site/src/components/analytics/enableEngagementTracking.ts
Summary by CodeRabbit
New Features
Refactor