- Introduction
- Quick Start Guide
- Event Types and Actions
- Comprehensive Example Usage
- Obtain API Key
- Dashboard Access
- Support
Moveo One Analytics is a user cognitive-behavioral analytics tool that provides deep insights into user interactions and behavior patterns. This SDK offers a pure JavaScript implementation that can be seamlessly integrated into any JavaScript environment, from web applications to React components.
- A valid Moveo One API key
npm install moveo-one-analytics-js
# or
yarn add moveo-one-analytics-js
import { MoveoOne } from "moveo-one-analytics-js";
// Initialize with your API token
const analytics = MoveoOne.getInstance("<YOUR_API_TOKEN>");
// Enable logging for debugging (optional)
analytics.setLogging(true);
// Set custom flush interval (optional, default: 10 seconds)
analytics.setFlushInterval(5000);
Session metadata should split sessions by information that influences content or creates visually different variations of the same application. Sessions split by these parameters will be analyzed separately by our UX analyzer.
Session metadata examples:
sessionMetadata.put("test", "a");
sessionMetadata.put("locale", "eng");
Additional metadata is used for data enrichment and enables specific queries or analysis by the defined split.
Additional metadata examples:
additionalMetadata.put("user_country", "US");
additionalMetadata.put("company", "example_company");
additionalMetadata.put("user_role", "admin"); // or "user", "manager", "viewer"
additionalMetadata.put("acquisition_channel", "organic"); // or "paid", "referral", "direct"
additionalMetadata.put("device_category", "mobile"); // or "desktop", "tablet"
additionalMetadata.put("subscription_plan", "pro"); // or "basic", "enterprise"
additionalMetadata.put("has_purchased", "true"); // or "false"
Single Session, Single Start
You do not need multiple start() calls for multiple contexts. The start()
method is called only once at the beginning of a session and must be called before any track()
or tick()
calls.
Use track()
when:
- You want to explicitly specify the event context
- You need to change context between events
- You want to use different context than the one specified in the start method
Use tick()
when:
- You're tracking events within the same context
- You want tracking without explicitly defining context
- You want to track events in the same context specified in the start method
- Context represents large, independent parts of the application and serves to divide the app into functional units that can exist independently of each other
- Examples:
onboarding
,main_app_flow
,checkout_process
- Semantic groups are logical units within a context that group related elements
- Depending on the application, this could be a group of elements or an entire screen (most common)
- Examples:
navigation
,user_input
,content_interaction
// Start the session
analytics.start("checkout_flow", {
version: "1.0.0",
environment: "production"
});
// Track an event with explicit context
analytics.track("checkout_flow", {
semanticGroup: "payment",
id: "submit_button",
type: "button",
action: "click",
value: "complete"
});
// Track an event in the same context (using tick)
analytics.tick({
semanticGroup: "navigation",
id: "back_button",
type: "button",
action: "click",
value: "go_back"
});
button
- Interactive buttons and controlsinput
- Form inputs and text fieldstext
- Static text contentimage
- Images and media contentlink
- Hyperlinks and navigation elementsform
- Form containers and submissionscontainer
- Content containers and sectionsnavigation
- Navigation elements and menus
click
- User clicks on an elementview
- Element comes into viewedit
- User modifies input contentsubmit
- Form submissionhover
- User hovers over an elementscroll
- Scrolling interactionsfocus
- Element receives focusblur
- Element loses focus
import { MoveoOne } from "moveo-one-analytics-js";
// Initialize analytics
const analytics = MoveoOne.getInstance("your-api-token-here");
analytics.setLogging(true);
// Start session with metadata
sessionMetadata.put("test", "a");
sessionMetadata.put("locale", "eng");
additionalMetadata.put("app_version", "2.1.0");
// Set additional metadata
additionalMetadata.put("user_country", "US");
additionalMetadata.put("company", "example_company");
additionalMetadata.put("user_role", "admin");
additionalMetadata.put("acquisition_channel", "organic");
additionalMetadata.put("device_category", "mobile");
additionalMetadata.put("subscription_plan", "pro");
additionalMetadata.put("has_purchased", "true");
// Track user interactions
function handleProductClick(productId) {
analytics.track("ecommerce_app", {
semanticGroup: "product_catalog",
id: `product_${productId}`,
type: "button",
action: "click",
value: "view_product"
});
}
function handleAddToCart(productId) {
analytics.track("ecommerce_app", {
semanticGroup: "shopping_cart",
id: `add_to_cart_${productId}`,
type: "button",
action: "click",
value: "add_item"
});
}
function handleFormInput(fieldName) {
analytics.tick({
semanticGroup: "user_input",
id: fieldName,
type: "input",
action: "edit",
value: "text_update"
});
}
// Update session metadata when user changes preferences
function updateUserPreferences(preferences) {
sessionMetadata.put("test", "a");
sessionMetadata.put("locale", "eng");
}
To get your API key, visit Moveo One Application and create a new project.
Once your data is being tracked, you can access your analytics through the Moveo One Dashboard.
For any issues or support, feel free to:
- Open an issue on our GitHub repository
- Email us at info@moveo.one