0.3.0 • Published 12 months ago

insight-actions v0.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

npm version

Insight-actions

Private library enabling applications to produce insight

Table of contents

Introduction

Insight-actions is a private library enabling applications to produce insight of how their users interact with it. The library automatically sends measurements to a system and will soon after be available for analysis on our insight-ui website. The library exposes a variant of measurements that are available to use inside ones application.

  • A test application has been created as a example on how to use it - insight-tester

Installation

npm i insight-actions

Usage

Insight-actions exports a class that needs to be instantiated to use it within your application.

Example

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});

Measurements

Measurement typeDescription
CountCounts everytime a user uses the application
SessionMeasures the time the user spends using the application
InteractionUsed to measure when a user interact with a link, button or something similar
ConversionUsed to measure a conversion rate of a flow or something simliar
InfoUsed to measure a specific value, statement or anything that the other ones doesn't cover
FeedbackEnables one to measure feedback ratings
ErrorEnables one to measure amount of errors

Methods

See below how to use each measurements:

Count

When instantiating the class this method will automatically be invoked

Session

When instantiating the class this method will automatically be invoked

Interaction

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});
test.interaction("InteractionButtonClicked");
test.interaction("AnotherInteractionButtonClicked");

Conversion

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});
test.conversion("Products");
test.conversion("Checkout");
test.conversion("Payment");
test.conversion("Confirmation");

Info

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});
test.info("CustomerDoesSomething");
test.info("CustomerDoesSomethingElse");

Feedback

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});
test.feedback("positive");
test.feedback("negative");

Error

import InsightActions from "insight-actions";

const test = new InsightActions("insight-tester", {});
test.error("Uncaught ReferenceError: InsightActions is not defined at <anonymous>:1:11");

Dependencies

0.3.0

12 months ago

0.2.0

12 months ago

0.1.0

12 months ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago