Repository navigation
feat: install Ahrefs Website Analytics on open.silver.dev - #34
Merged
Merged
Conversation
Companion to GRO-38: inject the native Ahrefs tracker via next/script (afterInteractive) in the root layout, next to Google Analytics, and only when NEXT_PUBLIC_AHREFS_ANALYTICS_KEY is present. Co-authored-by: Emiliano Potignano <me@epotignano.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Epotignano
marked this pull request as ready for review
September 11, 2026 13:59
lautaropaske
self-requested a review
September 11, 2026 14:33
lautaropaske
approved these changes
Sep 11, 2026
lautaropaske
left a comment
Contributor
There was a problem hiding this comment.
lgtm; already added key in open-silver @ vercel
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to GRO-38. Main-site tracking lives in
silver-dev-org/website; this repo servesopen.silver.dev.What
Load Ahrefs' native Website Analytics script on every page, gated on
NEXT_PUBLIC_AHREFS_ANALYTICS_KEY.The tracker is injected with
next/script(strategy="afterInteractive", the Next.js equivalent ofasync) from the root layout, next to the existing Google Analytics tag. PostHog stays oninstrumentation-client.ts. The script is omitted when the key is unset, so local/preview builds do not load it.After merge
Set
NEXT_PUBLIC_AHREFS_ANALYTICS_KEYin the production Vercel project (the publicdata-keyfrom the Ahrefs Web Analytics project that includesopen.silver.dev). Recheck installation in the Ahrefs dashboard.Testing
bun tscandbun run lintpass/,/fees-calculator,/resume-checker, and/salary-calculatorwithsrc="https://analytics.ahrefs.com/analytics.js",data-key,async, andafterInteractive. The browser requestedanalytics.ahrefs.com/analytics.js.