Files
Usman Baig 627613dc13 fix: code blocks rendering + consistent styling with ciphera-website /learn
- 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)
2026-03-29 01:01:56 +01:00

42 lines
1.0 KiB
Plaintext

---
title: "Vue.js"
description: "Add Pulse privacy-first analytics to your Vue.js app. Works with Vue 2, Vue 3, Vue CLI, and Vite."
category: "framework"
brandColor: "#4FC08D"
officialUrl: "https://vuejs.org"
relatedIds: ["nuxt", "vitepress"]
date: "2026-03-28"
---
Add the script to your `index.html` — works for both Vue CLI and Vite-based projects.
---
## Add the Pulse script to index.html
Both Vue CLI and Vite use an `index.html` as the entry point. Simply add the Pulse script inside the `<head>` tag.
```html filename="index.html"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script
defer
data-domain="your-site.com"
src="https://pulse.ciphera.net/script.js"
></script>
<title>My Vue App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
```
Looking for Nuxt? Check the dedicated [Nuxt guide](/integrations/nuxt).