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.
npm でのインストール
バンドラー(Next.js、Nuxt、SvelteKit、Vite、webpack、esbuild など)を使用している場合は、HTML に <script> タグを追加する代わりに、Zenovay を npm パッケージとしてインストールし、コードから init() を呼び出せます。
パッケージは @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' });init() は <script> タグと同じ https://api.zenovay.com/z.js ローダーを読み込みます。ワイヤーフォーマット上の挙動は同一です。npm パッケージはトラッカーのフォークではなく薄いラッパーなので、依存関係を更新しなくても常に最新の本番トラッカーが配信されます。
2 つのインストール方法の使い分け
| 方法 | 推奨用途 |
|---|---|
<script> タグ | 静的 HTML ページ、WordPress、Shopify、バンドラーを使わないシンプルな HTML |
@zenovay/tracker npm | バンドラーを使う最新アプリで、型付きの track、identify、goal 呼び出しが欲しい場合 |
npm パッケージは追加のインストール方法であり、<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!