- License
- MIT
- Deps
- 0
- Install Size
- 3.8 kB
- Vulns
- 0
- Published
$
npm install @bitfresh/astro-clarity$
pnpm add @bitfresh/astro-clarity$
yarn add @bitfresh/astro-clarity$
bun add @bitfresh/astro-clarity$
deno add npm:@bitfresh/astro-clarity$
vlt install @bitfresh/astro-clarity$
vp add @bitfresh/astro-clarityAstro Clarity
Microsoft Clarity integration for Astro.
Features
- Minimal and zero-config Astro integration
- Automatically injects Microsoft Clarity script in
- Can be disabled via enabled: false
- Works with Astro 4.x and 5.x
Installation
# Using npm
npm install @bitfresh/astro-clarity
# Using bun
bun add @bitfresh/astro-clarity
# Using yarn
yarn add @bitfresh/astro-clarity
# Using pnpm
pnpm add @bitfresh/astro-clarity
Usage
Add the integration in your astro.config.mjs:
import clarity from "@bitfresh/astro-clarity";
export default {
integrations: [
clarity({
projectId: "YOUR_CLARITY_PROJECT_ID",
enabled: true, // optional, default is true
}),
],
};
Options
| Option | Type | Default | Description |
|---|---|---|---|
projectId |
string |
— | Your Microsoft Clarity project ID (required). |
enabled |
boolean |
true |
Whether to load Clarity (optional). |