- Convert MDX CodeBlock components to standard markdown code fences - Add rehype-mdx-code-props to pass filename meta to code components - Custom pre/code MDX components map fences to CodeBlock - Add brand color badges (product + category) matching /learn layout - Match prose styling: orange inline code, orange links, white strong - Remove brand color background glow (not in /learn)
54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
---
|
|
title: "Nuxt"
|
|
description: "Configure Pulse analytics in Nuxt 2 or Nuxt 3 via nuxt.config. Simple, framework-native setup."
|
|
category: "framework"
|
|
brandColor: "#00DC82"
|
|
officialUrl: "https://nuxt.com/docs"
|
|
relatedIds: ["vue", "nextjs", "vitepress"]
|
|
date: "2026-03-28"
|
|
---
|
|
|
|
Configure Pulse analytics in your `nuxt.config` for a framework-native setup.
|
|
|
|
---
|
|
|
|
## Method 1: Nuxt 3
|
|
|
|
Add the Pulse script via the `app.head` option in your Nuxt 3 config.
|
|
|
|
```tsx filename="nuxt.config.ts"
|
|
export default defineNuxtConfig({
|
|
app: {
|
|
head: {
|
|
script: [
|
|
{
|
|
defer: true,
|
|
'data-domain': 'your-site.com',
|
|
src: 'https://pulse.ciphera.net/script.js',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
})
|
|
```
|
|
|
|
## Method 2: Nuxt 2
|
|
|
|
In Nuxt 2, use the `head` property in your config.
|
|
|
|
```jsx filename="nuxt.config.js"
|
|
export default {
|
|
head: {
|
|
script: [
|
|
{
|
|
defer: true,
|
|
'data-domain': 'your-site.com',
|
|
src: 'https://pulse.ciphera.net/script.js',
|
|
},
|
|
],
|
|
},
|
|
}
|
|
```
|
|
|
|
For more details, see the [Nuxt head config docs](https://nuxt.com/docs/api/nuxt-config#head).
|