Skip to content

feat: track external redirect estimates#516

Merged
ramboz merged 6 commits intomainfrom
redirect-time-tracking
Jan 21, 2026
Merged

feat: track external redirect estimates#516
ramboz merged 6 commits intomainfrom
redirect-time-tracking

Conversation

@ramboz
Copy link
Collaborator

@ramboz ramboz commented Nov 13, 2025

Use Case

As a marketer, I want to know how redirects impact my performance scores so that I can avoid undesired redirect chains.

Problem

At the moment, the OpTel Explorer only reports on internal redirects, not external ones. We've seen in customer discussions that external redirects could cause major increases to the TTFB that were hard to detect and debug.

Solution

Leveraging the PerformanceNavigationTiming APIs, we can track the time spent on external redirects before we land on the page, and can also estimate the number of redirects accordingly.

Technically, the idea is to track the redirect count and time in the target for the redirect checkpoint:

  • <redirectCount>:<redirectTime> for internal redirects
  • <estimatedRedirectCount>~<redirectTime> for external redirects

References

adobe/helix-website#1011

See background discussion in https://cq-dev.slack.com/archives/C07198KKQ07/p1761333727781429

Test URL

https://redirect-time-tracking--helix-rum-enhancer--adobe.aem.page/test/fixtures/otsdk-with-banner.html

@aem-code-sync
Copy link

aem-code-sync bot commented Nov 13, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

@trieloff trieloff left a comment

Choose a reason for hiding this comment

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

Do you think it would make sense to move redirect handling into a plugin? I think we get to a page trough redirects on less than 5% of pages.

@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking December 12, 2025 12:21 Inactive
@adobe-bot
Copy link
Collaborator

This PR will trigger a minor release when merged.

@ramboz ramboz force-pushed the redirect-time-tracking branch from 1569f38 to b307546 Compare December 12, 2025 12:21
@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking December 12, 2025 12:21 Inactive
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking January 5, 2026 07:26 Inactive
@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking January 16, 2026 12:51 Inactive
@ramboz ramboz force-pushed the redirect-time-tracking branch from 01a50d6 to 7d36320 Compare January 16, 2026 12:51
@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking January 16, 2026 12:51 Inactive
@ramboz ramboz marked this pull request as ready for review January 16, 2026 13:23
@ramboz ramboz requested a review from trieloff January 16, 2026 13:23
@ramboz
Copy link
Collaborator Author

ramboz commented Jan 16, 2026

@trieloff I was able to pick this up and update the code with your recommendations.

Once we have this deployed and live data flowing in, I'll work on updating the OpTel dashboard accordingly.

@aem-code-sync aem-code-sync bot temporarily deployed to redirect-time-tracking January 16, 2026 13:27 Inactive
@aem-code-sync
Copy link

aem-code-sync bot commented Jan 16, 2026

Page Scores Audits Google
📱 /test/fixtures/otsdk-with-banner.html PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /test/fixtures/otsdk-with-banner.html PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@ramboz ramboz merged commit aff3105 into main Jan 21, 2026
8 checks passed
@ramboz ramboz deleted the redirect-time-tracking branch January 21, 2026 09:40
@adobe-bot
Copy link
Collaborator

🎉 This PR is included in version 2.45.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants