Skip to content

Update click ID tracking - #136

Merged
Tom Tang (qwerzl) merged 1 commit into
mainfrom
agent/update-click-id-tracking
Aug 19, 2026
Merged

Update click ID tracking#136
Tom Tang (qwerzl) merged 1 commit into
mainfrom
agent/update-click-id-tracking

Conversation

@qwerzl

@qwerzl Tom Tang (qwerzl) commented Aug 19, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the Mintlify click-ID custom script with the provided tracking implementation
  • ignore blank Google Ads click IDs while retaining the 512-character limit and deterministic gclid / wbraid / gbraid priority
  • preserve the original 90-day window for repeat clicks, remove stale ID types, and reset capture time for new clicks

Impact

Visitors keep their existing attribution when no valid click ID is present. A valid new click replaces prior attribution, while repeat page loads do not extend the original attribution window.

Validation

  • pnpm lint
  • pnpm typecheck:docs
  • direct click-ID behavior checks for absent, blank, oversized, new, and repeated IDs
  • mint broken-links
  • mint validate

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Improved click-ID tracking by ignoring values with surrounding whitespace.
    • Added validation for click timestamps to ensure only valid positive values are accepted.
    • Preserved existing behavior when replacing click information from a new interaction.
    • Maintained cookie expiration and attribute behavior while improving tracking consistency.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 03ec7551-cfff-4ce7-9fbd-fdf8d9a6bb1d

📥 Commits

Reviewing files that changed from the base of the PR and between 6dc82a2 and 78b418b.

📒 Files selected for processing (1)
  • click-id-tracking.js

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

This change renames internal cookie constants, trims click-ID values before acceptance, stores the selected parameter type, validates recovered timestamps, and reuses one timestamp during new-click replacement.

Changes

Click-ID tracking

Layer / File(s) Summary
Cookie names and click-ID selection
click-id-tracking.js
Internal cookie identifiers and parsing names were renamed. Selection now returns { type, value } and rejects values that are empty after trimming.
Click handling and timestamp recovery
click-id-tracking.js
Same-click recovery accepts only positive integer timestamps. New-click replacement uses one captured timestamp for attribution storage.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit with clicks in my track,
Trimming stray spaces from each little pack.
Cookies get names that are tidy and bright,
Timestamps stay positive and right.
Hop, hop—the attribution is back!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/update-click-id-tracking

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

@qwerzl
Tom Tang (qwerzl) marked this pull request as ready for review August 19, 2026 21:03
Copilot AI lite review requested due to automatic review settings August 19, 2026 21:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qwerzl
Tom Tang (qwerzl) merged commit 7a98871 into main Aug 19, 2026
5 of 6 checks passed
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