Tracking Script Installation
Add Zenovay analytics to your website with a single line of code. No configuration required.
Quick Install (30 seconds)
Copy this script and paste it into your website's <head> section:
<!-- Zenovay Analytics v2.0.6 -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>Replace YOUR_TRACKING_CODE with your tracking code from the Zenovay Dashboard. It looks like ZV_ABC123XYZ.
That's it! The script automatically tracks:
- Page views
- Visitor sessions
- Geographic location
- Device and browser info
- Referral sources
- UTM parameters
Framework-Specific Installation
HTML / Static Sites
Add directly before the closing </head> tag:
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
<!-- Zenovay Analytics v2.0.6 -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
</head>
<body>
<!-- Your content -->
</body>
</html>React
Add the script in your root component's useEffect:
import { useEffect } from 'react';
function App() {
useEffect(() => {
const script = document.createElement('script');
script.src = 'https://api.zenovay.com/z.js';
script.defer = true;
script.setAttribute('data-tracking-code', 'YOUR_TRACKING_CODE');
document.head.appendChild(script);
}, []);
return <div>Your App</div>;
}
export default App;Next.js (App Router)
Add to your root layout file:
import Script from 'next/script';
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<Script
src="https://api.zenovay.com/z.js"
data-tracking-code="YOUR_TRACKING_CODE"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
);
}Next.js (Pages Router)
Add to your _document.tsx:
import { Html, Head, Main, NextScript } from 'next/document';
import Script from 'next/script';
export default function Document() {
return (
<Html>
<Head>
<Script
src="https://api.zenovay.com/z.js"
data-tracking-code="YOUR_TRACKING_CODE"
strategy="afterInteractive"
/>
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}Vue.js
Add to your index.html or use in App.vue:
<!DOCTYPE html>
<html>
<head>
<!-- Zenovay Analytics -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
</head>
<body>
<div id="app"></div>
</body>
</html>WordPress
Option 1: Using a Plugin (Recommended)
- Install the Insert Headers and Footers plugin
- Go to Settings → Insert Headers and Footers
- Paste this in "Scripts in Header":
<!-- Zenovay Analytics -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>Option 2: Edit Theme
Add to header.php before </head>:
<!-- Zenovay Analytics -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
</head>Shopify
- Go to Online Store → Themes
- Click Actions → Edit code
- Open
theme.liquid - Add before
</head>:
<!-- Zenovay Analytics -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>
</head>Webflow
- Go to Project Settings → Custom Code
- Paste in the Head Code section:
<!-- Zenovay Analytics -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="https://api.zenovay.com/z.js">
</script>Squarespace
- Go to Settings → Advanced → Code Injection
- Paste in the Header section
Verify Installation
1. Check Browser Console
Open your browser's developer tools (F12) and look for:
[Zenovay] Script executing... (v2.0.6)
Zenovay Analytics loaded { trackingCode: 'YOUR_TRACKING_CODE', enabled: true }
2. Enable Debug Mode
To see detailed logs, enable debug mode in your Dashboard Settings or add the debug attribute:
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
data-debug="true"
src="https://api.zenovay.com/z.js">
</script>For a visual, in-page view of every event your tracker sends — type, props, cookieless mode, GPC state, consent state — turn on the Debug Overlay in your domain settings, then load any page with ?zenovay_debug=1 appended to the URL. PII is masked.
3. Check Real-Time Dashboard
Visit your Zenovay Dashboard and check the Real-Time view to see your visit appearing live.
Script Attributes
Customize behavior with data attributes:
| Attribute | Type | Default | Description |
|---|---|---|---|
data-tracking-code | string | required | Your tracking code (e.g., ZV_ABC123) |
data-debug | boolean | false | Show console logs |
data-allow-localhost | boolean | false | Track localhost visits |
Ad Blocker Protection
Some ad blockers may block api.zenovay.com. Use our First-Party Proxy for 100% tracking accuracy:
If you're seeing blocked requests in Firefox or Edge, set up a First-Party Proxy to route tracking through your own domain.
<!-- First-Party Proxy (bypasses ad blockers) -->
<!-- Requires proxy setup - see: docs.zenovay.com/guides/first-party-tracking -->
<script defer
data-tracking-code="YOUR_TRACKING_CODE"
src="/api/_z/script.js">
</script>Content Security Policy (CSP)
If your site uses CSP headers, add Zenovay:
Content-Security-Policy:
script-src 'self' https://api.zenovay.com;
connect-src 'self' https://api.zenovay.com;Troubleshooting
Script Not Loading
- Check for typos in your tracking code
- Verify the script is in
<head>not<body> - Check CSP headers - add api.zenovay.com to allowed sources
- Disable ad blocker temporarily to test
No Events in Dashboard
- Wait 30 seconds - events are batched
- Check browser console for errors
- Enable debug mode to see event logs
- Try incognito/private window to rule out extensions
Ad Blocker Blocking Script
Set up a First-Party Proxy to route tracking through your domain.
Using AI to Install
If you're using AI coding assistants (Cursor, Lovable, Replit), check our AI Integration Prompts for copy-paste prompts.
Next Steps
- First-Party Proxy - Bypass ad blockers
- Custom Events - Track specific user actions
- AI Integration Prompts - Prompts for AI coding assistants