-
Notifications
You must be signed in to change notification settings - Fork 1
Stats
This module allows to send statistics of application usage.
###Configure statistics
####Sending subbeacons
You can send subbeacons of information as well. You can track events that have a duration and measure it ("user enters on tutorial view") or track just eventually actions ("clicked settings").
Use the following method:
MCMCoreAdapter.getInstance().moduleStatsStartBeaconWithName("subB1");
to mark the end of the action type:
MCMCoreAdapter.getInstance().moduleStatsStopBeaconWithName("subB1");
####Sending tags
Malcom allows you to split your users and identify sections. Imagine you want to identify the users that want to receive info about "sports". Then, when the user selects to receive this info, this device could be tagged with the "sports" tag. Automatically, Malcom servers will receive this new tag on real time and you will be able to send push notifications to desired people.
To add tags you should use the following method:
MCMCoreAdapter.getInstance().moduleStatsAddTag("tag");
MCMCoreAdapter.getInstance().moduleStatsRemoveTag("tag");
Malcom as well, has the potential to identify users if you want. Just call this method in the proper point of your app (once you have the desired info):
MCMCoreAdapter.getInstance().moduleStatsIdentifyUser("John Appleseed","[email protected]");
If you want to add more info to the user simply add a Hashtable
with the desired info, as in the following example:
//creates the hash table
Hashtable<String, Object> additionalInfoHashTable = new Hashtable<String, Object>();
//populates it with info
additionalInfoHashTable.put("mobile","679768973");
additionalInfoHashTable.put("age","20");
//sends to Malcom with additional info
MCMCoreAdapter.getInstance().moduleStatsIdentifyUser("John Appleseed","[email protected]", additionalInfoHashTable);
Malcom provides you a method if you want to track the revenues of your in-app purchases in real time. Just call the following method:
//Example of use
moduleStatsRegisterRevenue("Product1","V4C3D5C2", 1.79, "EUR", 1);
//this is the declaration of the method
public void moduleStatsRegisterRevenue(String name, String SKU, float price, String currencyCode, int amount);