Framework Guides
Where to add the Pulse script in popular frameworks, CMS platforms, and tag managers.
The Pulse tracking script works on any website that renders HTML. Below are the most common setups — each shows where to paste the snippet for your stack. For script attributes and configuration, see Script Tag.
Next.js
Use next/script with strategy="afterInteractive" to load the script after hydration without blocking the page.
import Script from 'next/script'
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Script
defer
data-domain="example.com"
src="https://js.ciphera.net/script.js"
strategy="afterInteractive"
/>
</body>
</html>
)
}React / Vite
Add the snippet directly to index.html inside <head>:
<head>
<script defer data-domain="example.com" src="https://js.ciphera.net/script.js"></script>
</head>Vue / Nuxt
In nuxt.config.ts, use the app.head option:
export default defineNuxtConfig({
app: {
head: {
script: [
{
defer: true,
'data-domain': 'example.com',
src: 'https://js.ciphera.net/script.js',
},
],
},
},
})For plain Vue with Vite, add the tag to index.html the same way as the React/Vite approach above.
Astro
Add the snippet to your base layout inside <head>:
---
// src/layouts/Base.astro
---
<html>
<head>
<script defer data-domain="example.com" src="https://js.ciphera.net/script.js"></script>
</head>
<body><slot /></body>
</html>Shopify
In your Shopify admin, go to Online Store → Themes → Edit Code. Open layout/theme.liquid and paste the snippet just before </head>.
Webflow
In your Webflow project, go to Site Settings → Custom Code. Paste the snippet in the Head Code field and publish.
Google Tag Manager
- In GTM, go to Tags → New.
- Choose Custom HTML as the tag type.
- Paste the tracking snippet:
<script defer data-domain="example.com" src="https://js.ciphera.net/script.js"></script>- Set the trigger to All Pages.
- Click Submit to publish.
If you use a custom API endpoint (e.g. via a proxy), add a configuration script before the tracking snippet:
<script>window.pulseConfig = { apiUrl: 'https://yourdomain.com/api/collect' }</script>
WordPress
Use the official Pulse Analytics plugin — it handles script loading, proxy routing, and configuration without editing theme files.
Squarespace
In your Squarespace admin, go to Settings → Developer Tools → Code Injection. Paste the snippet in the Header field and save.
Wix
In your Wix dashboard, go to Settings → Custom Code. Add the snippet to the Head section. Requires a Premium plan.
Ghost
In your Ghost admin, go to Settings → Code Injection. Paste the snippet in the Site Header field and save.
Other platforms
For any platform not listed here, paste the Pulse script tag into your site's <head> element. See Script Tag for the full snippet and configuration options.