メインコンテンツへスキップ
2分で読めます

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:

Add to your HTML headHTML
<!-- 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 として公開されています。

InstallBash
npm install @zenovay/tracker
Initialize and trackTypeScript
import { 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バンドラーを使う最新アプリで、型付きの trackidentifygoal 呼び出しが欲しい場合

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 custom events after script loadsJavaScript
// 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:

  1. Visit your website
  2. Open browser developer tools
  3. Check the Network tab for requests to zenovay.com
  4. Visit your Zenovay dashboard to see real-time data

Your analytics should start appearing in your dashboard within 5 minutes!

Next Steps

このページは役に立ちましたか?