Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.5 KB

File metadata and controls

37 lines (22 loc) · 1.5 KB

#Stats Module

This module allows you to send two useful statistics from your app: events and tags.

We'll explain what they mean and how easy it is to send the statistics. Then we'll show examples of what you can do with that information.

##How to send stats

###Events

An event represents an action that the user has performed in your app. For example, if you want to track users that enter the "Deals" section of your app, call this method:

MalcomLib.startEvent("enter-deals");

You can use any name for your events but we recommend you to choose short ones; they will be easier to manage later.

###Tags

A tag represents a feature that a user enables or disables. A typical usage is when a user subscribes to receive email offers or notifications of some topic. For example, if the user enables an option to receive emails with deals you can call this method:

MalcomLib.addTag("email-deals");

When the user disables the option, you should call:

MalcomLib.removeTag("email-deals");

As with events, we recommend you to choose short names for your tags.

##Using events and tags

You can use events and tags in many ways. For example, in Malcom web you can create a segment that includes users that entered the "Deals" section of your app (i.e. that triggered the "enter-deals" event). That segmentation lets you see statistics for that kind of users and also send notifications and campaigns only to them.