SkyAnalytics JS is an adapter for SkyAnalytics that allows you to track your website's traffic and user behavior.
npm install @skyanalytics/js
import skyanalytics from '@skyanalytics/js';
skyanalytics.init({
key: 'source_key',
host: 'http://localhost:3000'
});
analytics.navigation({ name: 'page_name' });
analytics.event({ name: 'event_name' });
You can add metadata to your navigations
.
analytics.navigation({ name: 'page_name', metadata: { key1: 'value1', key2: 'value2' } });
Global metadata can be set using the metadata
method.
analytics.metadata({ key1: 'value1', key2: 'value2' });