Skip to content

chore(Tracking): Remove the unused page-view tracking - #9126

Open
talissoncosta wants to merge 2 commits into
chore/remove-linkedin-albacrossfrom
chore/remove-page-tracking
Open

talissoncosta wants to merge 2 commits into
chore/remove-linkedin-albacrossfrom
chore/remove-page-tracking

Conversation

@talissoncosta

@talissoncosta talissoncosta commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Stacked on #9127, which removes Universal Analytics and leaves API.trackPage as a no-op. On hold with it.

  • Removes API.trackPage and its 18 call sites. Effects that only tracked the page are deleted.
  • usePageTracking becomes useSaveLastEnvironment, keeping the one thing it still did: saving the last-used environment (lastEnv) from the features page.
  • Removes the Constants.pages and Constants.modals labels, which only fed trackPage.

Deletions only, no behaviour change.

How did you test this code?

  • npm run test:unit passes. No new type errors.
  • Open the features page, then reload /: the app should still return to the last environment.

@vercel

vercel Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Nov 26, 2026 3:55pm UTC
flagsmith-frontend-staging Ready Ready Preview Nov 26, 2026 3:55pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 26, 2026 3:55pm UTC

Request Review

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-9126 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-9126 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-9126 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith:pr-9126 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-private-cloud:pr-9126 Finished ✅ Results ✅
ghcr.io/flagsmith/flagsmith-frontend:pr-9126 Finished ✅ Results ✅

@github-actions github-actions Bot added the chore label Nov 26, 2026

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 23 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot 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.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Removes dead no-op page-view tracking calls and their page/modal constants, replacing the tracking hook with a focused useSaveLastEnvironment hook that preserves lastEnv persistence. The diff is deletion-only and behavior-preserving.

Turn on auto-fix | Re-trigger cubic

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor
✅ oss · depot-ubuntu-latest-arm-16 — run #23855 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.6 seconds
commit  ee94af4
info  🔄 Run: #23855 (attempt 1)

🗂️ Previous results
✅ oss · depot-ubuntu-latest-16 — run #23855 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  31.4 seconds
commit  ee94af4
info  🔄 Run: #23855 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #23850 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  35.7 seconds
commit  378f463
info  🔄 Run: #23850 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23850 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  3.6 seconds
commit  378f463
info  🔄 Run: #23850 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23850 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  38.1 seconds
commit  378f463
info  🔄 Run: #23850 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #23850 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  31.6 seconds
commit  378f463
info  🔄 Run: #23850 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23847 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 1 second
commit  5edf758
info  🔄 Run: #23847 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23846 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 5 suites
duration  36.5 seconds
commit  5edf758
info  🔄 Run: #23846 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #23846 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  56.3 seconds
commit  5edf758
info  🔄 Run: #23846 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #23847 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  3.5 seconds
commit  5edf758
info  🔄 Run: #23847 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23846 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.5 seconds
commit  5edf758
info  🔄 Run: #23846 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #23847 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.3 seconds
commit  5edf758
info  🔄 Run: #23847 (attempt 1)

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Visual Regression

29 screenshots compared. See report for details.
View full report

@talissoncosta
talissoncosta force-pushed the chore/remove-page-tracking branch from b10dc67 to 5edf758 Compare November 26, 2026 14:48
@talissoncosta
talissoncosta requested a review from a team as a code owner November 26, 2026 14:48
@talissoncosta
talissoncosta requested review from Holmus and removed request for a team November 26, 2026 14:48
@talissoncosta
talissoncosta changed the base branch from chore/remove-unused-trackers to chore/remove-linkedin-albacross November 26, 2026 14:48
@github-actions github-actions Bot added chore and removed chore labels Nov 26, 2026
@talissoncosta
talissoncosta force-pushed the chore/remove-linkedin-albacross branch from 703b881 to 8d9479a Compare November 26, 2026 14:54
@talissoncosta
talissoncosta force-pushed the chore/remove-page-tracking branch from 5edf758 to 378f463 Compare November 26, 2026 14:54
@github-actions github-actions Bot added chore and removed chore labels Nov 26, 2026
@talissoncosta
talissoncosta force-pushed the chore/remove-linkedin-albacross branch from 8d9479a to 06cb4c8 Compare November 26, 2026 15:54
talissoncosta and others added 2 commits November 26, 2026 12:54
trackPage only fed Universal Analytics. usePageTracking becomes
useSaveLastEnvironment, keeping the lastEnv storage it also did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
Preview – flagsmith-frontend-staging — ee94af41 Deployed Nov 26, 2026 by vercel[bot]
Preview – flagsmith-frontend-preview — ee94af41 Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant