Skip to content

Add Microsoft Clarity analytics#46

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/add-microsoft-clarity-analytics
Closed

Add Microsoft Clarity analytics#46
Copilot wants to merge 2 commits intomainfrom
copilot/add-microsoft-clarity-analytics

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

Adds the Microsoft Clarity tracking script to the shared layout <head>, gated by the PUBLIC_CLARITY_PROJECT_ID environment variable.

  • Script is conditionally rendered — omitted entirely when the env var is unset
  • Uses Astro's define:vars to inject the project ID at build time

Usage

Set in your deployment environment or .env:

PUBLIC_CLARITY_PROJECT_ID=your-project-id

Screenshot

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • telemetry.astro.build
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/dev-proxy-tools.github.io/dev-proxy-tools.github.io/node_modules/.bin/astro build (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/dev-proxy-tools.github.io/dev-proxy-tools.github.io/node_modules/.bin/astro dev --port 4321 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add Microsoft Clarity analytics</issue_title>
<issue_description>https://learn.microsoft.com/clarity/setup-and-installation/clarity-setup</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: garrytrinder <11563347+garrytrinder@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Microsoft Clarity analytics Add Microsoft Clarity analytics Mar 5, 2026
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.

Add Microsoft Clarity analytics

2 participants