Skip to content

Conversation

@stordahl
Copy link
Collaborator

@stordahl stordahl commented Dec 14, 2025

Overview

Enhanced referrer tracking to accept referrer information from various query parameters when document.referrer is unavailable. The tracker now checks multiple common referrer parameters (ref, referer, referrer, source, utm_source) in priority order, improving attribution accuracy for users arriving via links with tracking parameters.

Changes by Package

@counterscale/cli

No changes made to the CLI package.

@counterscale/server

No changes made to the server package.

@counterscale/tracker

  • Enhanced getBrowserReferrer() function to check query parameters for referrer information
  • Added support for multiple referrer parameters: ref, referer, referrer, source, utm_source
  • Implemented priority order: explicit referrer parameter → document.referrer → query parameters
  • Refactored referrer logic for better maintainability

Other Changes

Additional Notes

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.73%. Comparing base (1f92237) to head (6708c63).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #240      +/-   ##
==========================================
+ Coverage   84.58%   84.73%   +0.14%     
==========================================
  Files          55       55              
  Lines        1855     1860       +5     
  Branches      517      515       -2     
==========================================
+ Hits         1569     1576       +7     
+ Misses        252      250       -2     
  Partials       34       34              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stordahl stordahl marked this pull request as ready for review December 14, 2025 16:11
@stordahl stordahl merged commit 405567a into main Dec 14, 2025
3 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