Skip to content

Add Microsoft Clarity to the root layout - #12

Merged
raqibnur merged 1 commit into
mainfrom
claude/add-clarity-tracking-d88582
Sep 30, 2026
Merged

raqibnur merged 1 commit into
mainfrom
claude/add-clarity-tracking-d88582

Conversation

@raqibnur

Copy link
Copy Markdown
Owner

What this changes

Adds the Microsoft Clarity tag (project yq9lytqnm9) to app/layout.tsx, loaded with next/script using the afterInteractive strategy. No effect, registry item, or gallery file is touched.

Why

The site had no analytics. Clarity gives session recordings and heatmaps for the landing page and gallery.

Reviewer notes

  • Production only. The script renders only when NODE_ENV === "production", so npm run dev sessions are not recorded. Vercel preview deployments are production builds and will still record.
  • No env var. The project ID is hardcoded; it is public in the page source either way.
  • No new dependency. next/script is part of Next.
  • Consent is not handled. Clarity sets cookies and records sessions, and the site has no consent banner or privacy note. That matters for EU/UK visitors and is left as a separate decision.
  • Not verified against the Clarity dashboard. The tag is confirmed present in the built index.html; whether data arrives can only be checked after deploy.

The gate

Every PR

  • npm run lint passes (run on app/layout.tsx)
  • npm run build passes
  • No new dependency, runtime or dev

🤖 Generated with Claude Code

Loads the Clarity tag through next/script after hydration so the site has
session recordings and heatmaps. Gated to production builds so local dev
sessions stay out of the data. next/script ships with Next, so this adds
no dependency.

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

vercel Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hoverui Ready Ready Preview Sep 30, 2026 6:23am UTC

@raqibnur
raqibnur merged commit 7bda923 into main Sep 30, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — 9bcc4e9a Deployed Sep 30, 2026 by vercel[bot]
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