Skip to content

Replace Scarf with TanStack company analytics - #1247

Merged
tannerlinsley merged 2 commits into
mainfrom
taren/namethathost-tracker
Sep 11, 2026
Merged

tannerlinsley merged 2 commits into
mainfrom
taren/namethathost-tracker

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

TanStack.com now sends public page activity to TanStack's namethathost service instead of Scarf. A single deferred production script records initial loads and SPA pathname changes with the reserved TanStack tracker key. The Scarf pixel and unused library IDs are removed.

The privacy policy describes company-network lookup, retention, and the tracker's Do Not Track and Global Privacy Control support. Company matches are not presented as identified people or confirmed product adoption.

Validation: pnpm test passed, including type checks, lint and 494 tests (one skipped). pnpm build passed. The collector is deployed with a 1,000/day provider cap; company enrichment awaits the ipapi.is API key.

Summary by CodeRabbit

  • New Features

    • Added a production-only analytics tracker that loads in the background and respects privacy-focused browser settings.
  • Privacy

    • Updated the privacy policy’s effective date.
    • Documented the tracker’s data collection, IP handling, retention periods, and support for Do Not Track and Global Privacy Control.
  • Changes

    • Removed the previous library-level analytics tracking integration and related metadata.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0c11c144-e26c-4529-9875-bbc610358d29

📥 Commits

Reviewing files that changed from the base of the PR and between 2e8b032 and 6dd819f.

📒 Files selected for processing (7)
  • src/components/Scarf.tsx
  • src/libraries/libraries.ts
  • src/libraries/types.ts
  • src/routes/__root.tsx
  • src/routes/_library/$libraryId/route.tsx
  • src/routes/privacy.tsx
  • tests/static-data-contracts.test.ts
💤 Files with no reviewable changes (4)
  • src/libraries/types.ts
  • src/libraries/libraries.ts
  • src/components/Scarf.tsx
  • tests/static-data-contracts.test.ts

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The PR removes Scarf tracking and its library metadata. It adds a production-only NameThatHost tracker, updates the privacy policy, and removes related UUID validation.

Changes

Analytics tracking migration

Layer / File(s) Summary
Remove Scarf tracking and metadata
src/components/Scarf.tsx, src/libraries/..., src/routes/_library/$libraryId/route.tsx, tests/static-data-contracts.test.ts
The Scarf component, route rendering, scarfId fields, library metadata, and UUID checks are removed.
Add production tracking and privacy text
src/routes/__root.tsx, src/routes/privacy.tsx
The root route loads the deferred tracker in production. The privacy policy documents tracker data handling and updates its effective date.

Priority: ➖ Normal

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

Sequence Diagram(s)

sequenceDiagram
  participant ShellComponent
  participant DocumentHead
  participant NameThatHostTracker
  ShellComponent->>DocumentHead: inject deferred tracker script in production
  DocumentHead->>NameThatHostTracker: load tracker.js
Loading

Suggested reviewers: abeuty

Merge Risk: ⚪ Minimal · up to 6dd81

No actionable merge-blocking risk remains in the analytics migration.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing Scarf analytics with TanStack company analytics.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/namethathost-tracker

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 6dd819f Commit Preview URL

Branch Preview URL
Sep 11 2026, 01:23 AM

@tannerlinsley
tannerlinsley merged commit e445667 into main Sep 11, 2026
6 of 7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/namethathost-tracker branch September 11, 2026 01:24
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.

1 participant