Installation
Get Zenovay Analytics up and running on your website in just a few minutes.
Quick Start
Add our tracking script to your website's <head> tag:
<!-- Zenovay Analytics -->
<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.
Instalação via npm
Se você usa um bundler (Next.js, Nuxt, SvelteKit, Vite, webpack, esbuild, etc.), pode instalar o Zenovay como pacote npm e chamar init() a partir do seu código, em vez de adicionar uma tag <script> no HTML.
O pacote é publicado como @zenovay/tracker.
npm install @zenovay/trackerimport { init, track } from '@zenovay/tracker';
init('YOUR_TRACKING_CODE');
// Later, from any component or handler:
track('Signup clicked', { source: 'hero' });A chamada init() injeta o mesmo loader https://api.zenovay.com/z.js que a tag <script> usa — o comportamento de wire-format é idêntico. O pacote npm é um wrapper fino, não um fork do código-fonte do rastreador, então você sempre recebe a versão de produção mais recente sem precisar atualizar uma dependência.
Como escolher entre os dois métodos
| Método | Recomendado para |
|---|---|
Tag <script> | Páginas HTML estáticas, WordPress, Shopify, HTML simples sem bundler |
@zenovay/tracker npm | Aplicações modernas com bundler onde você quer chamadas track, identify, goal tipadas |
O pacote npm é uma opção de instalação adicional — não substitui a tag <script>.
Framework-Specific Setup
For modern frameworks like React, Vue, or Next.js, you add the same script tag within your app's HTML template or root layout. See the framework-specific guides for details:
Once the script is loaded, you can use the global window.zenovay object to track custom events:
// Track a custom event
zenovay('track', 'button_click', {
button_id: 'signup-cta',
page: '/pricing'
});
// Identify a user
zenovay('identify', 'user_123', {
email: '[email protected]',
plan: 'pro'
});Server-Side Tracking
For server-side applications (Node.js, Express, etc.), use the Zenovay External API directly with fetch. No npm package is needed. See the Node.js Quickstart or Express.js Quickstart for details.
Verification
After installation, you can verify that Zenovay is working correctly:
- Visit your website
- Open browser developer tools
- Check the Network tab for requests to
zenovay.com - Visit your Zenovay dashboard to see real-time data
Your analytics should start appearing in your dashboard within 5 minutes!