@skyanalytics/js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

SkyAnalytics JS

SkyAnalytics JS is an adapter for SkyAnalytics that allows you to track your website's traffic and user behavior.

npm version

Installation

npm install @skyanalytics/js

Usage

import skyanalytics from '@skyanalytics/js';

skyanalytics.init({
    key: 'source_key',
    host: 'http://localhost:3000'
});

Tracking page views

analytics.navigation({ name: 'page_name' });

Tracking events

analytics.event({ name: 'event_name' });

Metadata

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' });

Readme

Keywords

none

Package Sidebar

Install

npm i @skyanalytics/js

Weekly Downloads

3

Version

1.1.0

License

MIT

Unpacked Size

3.74 kB

Total Files

8

Last publish

Collaborators

  • carum98