Skip to content

Always set client-tracked click ID if successful#68

Merged
steven-tey merged 1 commit intomainfrom
fix-click-tracking
Jan 12, 2026
Merged

Always set client-tracked click ID if successful#68
steven-tey merged 1 commit intomainfrom
fix-click-tracking

Conversation

@steven-tey
Copy link
Contributor

@steven-tey steven-tey commented Jan 12, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved click tracking reliability through simplified ID validation logic.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Jan 12, 2026

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

Project Deployment Review Updated (UTC)
analytics-nextjs-geolocation-script Ready Ready Preview, Comment Jan 12, 2026 5:22pm

@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

Removed client-server click ID consistency validation from the trackClick function. The serverClickId parameter check has been deleted, allowing cookie setting for DUB_ID_VAR to occur unconditionally based on server response data without prior client-side validation.

Changes

Cohort / File(s) Summary
Click ID Validation Removal
packages/script/src/base.js
Deleted serverClickId retrieval from URL parameters and removed the conditional comparison that validated serverClickId against data.clickId. Cookie setting for DUB_ID_VAR now executes unconditionally.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Click checks are gone, the path runs clear,
No validation to interfere,
Cookies now set without a doubt,
Trust the server, let it out!
Simpler logic hops along,
Making our script quick and strong.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing a client-server ID consistency check to always set the click ID on successful responses.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb4cfa9 and b7f8562.

📒 Files selected for processing (1)
  • packages/script/src/base.js
💤 Files with no reviewable changes (1)
  • packages/script/src/base.js

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steven-tey steven-tey merged commit 811e701 into main Jan 12, 2026
4 checks passed
@steven-tey steven-tey deleted the fix-click-tracking branch January 12, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants