0.3.0 • Published 12 months ago
insight-actions v0.3.0
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 type | Description |
---|---|
Count | Counts everytime a user uses the application |
Session | Measures the time the user spends using the application |
Interaction | Used to measure when a user interact with a link, button or something similar |
Conversion | Used to measure a conversion rate of a flow or something simliar |
Info | Used to measure a specific value, statement or anything that the other ones doesn't cover |
Feedback | Enables one to measure feedback ratings |
Error | Enables 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");