Skip to content

Keep referrer for external links#1706

Open
Miranda Wilson (mscwilson) wants to merge 4 commits into
mainfrom
referrer-snowplow-domains
Open

Keep referrer for external links#1706
Miranda Wilson (mscwilson) wants to merge 4 commits into
mainfrom
referrer-snowplow-domains

Conversation

@mscwilson

@mscwilson Miranda Wilson (mscwilson) commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

What changed?

Adds a client module to remove noreferrer for external links.

Why a client module rather than another solution:
@docusaurus/Link isn't swizzleable.
The closest is to swizzle MDXComponents/A for external links within markdown pages, and then separately handle external links in the footer (swizzle Footer/LinkItem) and custom React components.

Why?

To help with data analysis, and to let external sites know we're driving traffic for them.

@netlify

netlify Bot commented Apr 7, 2026

Copy link
Copy Markdown

Deploy Preview for snowplow-docs ready!

Name Link
🔨 Latest commit b4aeb29
🔍 Latest deploy log https://app.netlify.com/projects/snowplow-docs/deploys/69d649d3dcc1a20008b8809a
😎 Deploy Preview https://deploy-preview-1706--snowplow-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 22 (🟢 up 2 from production)
Accessibility: 93 (no change from production)
Best Practices: 100 (no change from production)
SEO: 95 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@claude

claude Bot commented Apr 7, 2026

Copy link
Copy Markdown

Writing quality review

This PR contains only code changes (a JavaScript module and a config update), so the documentation style guide doesn't apply here. No writing quality issues to flag.

The code comment at the top of snowplowReferrer.js is clear and accurately describes what the module does.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 7, 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
documentation b4aeb29 Commit Preview URL

Branch Preview URL
Apr 08 2026, 12:39 PM

@mscwilson Miranda Wilson (mscwilson) changed the title Keep referrer for Snowplow domains Keep referrer for external links Apr 8, 2026
/**
* Client module that strips `noreferrer` from all external links.
* Keeps `noopener` for security. Uses Docusaurus's onRouteDidUpdate
* lifecycle to run once per page navigation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So it does this at runtime? Is there a way to do this at build time?

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.

3 participants