@asayerio/trackerdeprecated

The Asayer tracker main package

Usage no npm install needed!

<script type="module">
  import asayerioTracker from 'https://cdn.skypack.dev/@asayerio/tracker';
</script>

README

Asayer Tracker

The main package of the Asayer tracker.

Installation

npm i @asayerio/tracker --save

Usage

Initialize the package from your codebase entry point and start the tracker. You must set the projectID option in the constructor. Its value can can be found in your Asayer dashboard under Preferences -> Projects.

import Tracker from '@asayerio/tracker';

const tracker = new Tracker({
  projectID: PROJECT_ID,
});
tracker.start();

Then you can use Asayer JavaScript API anywhere in your code.

tracker.userID('my_user_id');
tracker.metadata('env', 'prod');

Read our docs for more information.