Events
Event is a powerful tool to track interaction between user and mobile application.
There are 3 kinds of events, which are
- Simple Event
- Counting Event
- Computing Event
1. Simple Event
Simple event is an event without parameters. It can be used to track simple event. For example, if you need to track how many times user Clicked "Registration" button. Just put a line at onClick() function in the activity.
Simple event can be used to construct funnel, the details for same can be found under funnel section.
For more complicated event tracking - Counting Event or Computing Event should be considered.
2. Counting Event public void onCreate() { } |
Simple event can be used to construct funnel, the details for same can be found under funnel section.
For more complicated event tracking - Counting Event or Computing Event should be considered.
Counting Event is useful to track event which needs counting. For example, if we are developing a news application. This application has three categories, which are local news, national news and international news. We need to know which category is the most popular, just implement the following code on click listener.
As the events are different and AdGyde Server needs to differentiate that the event is counting event, therefore events need to be added in Dashboard with specified type.
Following are the steps to add counting event in Dashboard
3. Computing Event /** public void onCategoryLocalNewsClicked(View view) { * Being triggered if "Local News" tab clicked. */ Map<String, String> params = new HashMap<String, String>();} /** public void onCategoryNationalNewsClicked(View view) { * Being triggered if "National News" tab clicked. */ Map<String, String> params = new HashMap<String, String>();} /** public void onCategoryInternationalNewsClicked(View view) { * Being triggered if "International News" tab clicked. */ Map<String, String> params = new HashMap<String, String>();} |
As the events are different and AdGyde Server needs to differentiate that the event is counting event, therefore events need to be added in Dashboard with specified type.
Following are the steps to add counting event in Dashboard
- Login to AdGyde Dashboard
- Open Setup Page from Left Navigation Menu
- Click on Manage Events under Events option
- Click on 'Create an Event' button on Top right Corner
- Select your Application Name
- Select 'Counting' under Type field
- Enter event_id as 'selected category', this should be same as first parameter of AdGyde.onCountingEvent(String, Map<String, String>)
- Enter 'category' on parameter_name field
- Click on 'Create' button
Computing Event can be used to track accumulative values.
E.g. If we put our banner in application with different Weightage or say Cost, then using the computing event we can know the Contribution of each Banner as per weightage assigned.
Computing event uses 2 parameters. First parameter defines event id say 'offerslist' and parameter which will be accumulated. Second parameter defines parameter value. For example, application placed 2 banners. First for a 'Special Offer', with Product of ₹6. Second is 'Exclusive Offer', with Product of ₹55. 'Special Offer' clicked 39 times, 'Exclusive Offer' clicked 4 times. Accumulated value is 'Special Offer' = ₹6 * 39 = ₹234, 'Exclusive Offer' = ₹55 * 4 = ₹210.
4. Revenue EventE.g. If we put our banner in application with different Weightage or say Cost, then using the computing event we can know the Contribution of each Banner as per weightage assigned.
/** public void onOfferClicked(Offer offer) { * Invoked when Offer clicked. */ Map<String, String> params = new HashMap<String, String>();} |
Computing event uses 2 parameters. First parameter defines event id say 'offerslist' and parameter which will be accumulated. Second parameter defines parameter value. For example, application placed 2 banners. First for a 'Special Offer', with Product of ₹6. Second is 'Exclusive Offer', with Product of ₹55. 'Special Offer' clicked 39 times, 'Exclusive Offer' clicked 4 times. Accumulated value is 'Special Offer' = ₹6 * 39 = ₹234, 'Exclusive Offer' = ₹55 * 4 = ₹210.
There is a separate Revenue event which should and can be used for keeping track of revenue generated through the application. Revenue shown in the Dashboard is also based on this event only.
5. Unique Event private void fireRevenueEvent() { AdGyde.onRevenue(17);} |
Unique Event is useful to track events which need unique counting in a specific time period. For example, if we develop a news application. This application has three categories, which are local news, national news and international news.
AdGyde provides Unique Events in three types
The 3 Types of Unique events can be used for different requirements
For the unique event following code needs to be implemented
As the events are different and AdGyde Server needs to differentiate that the event is unique event, therefore events need to be added in Dashboard with specified type.
Please follow instructions below to create unique event
AdGyde provides Unique Events in three types
- onDailyUnique
- onPermanentUnique
- onCustomUnique
The 3 Types of Unique events can be used for different requirements
- To know how many unique users complete the Game Stage in each date, onDailyUnique should be used
- To know how many unique users complete the Game Stage in user lifetime, onPermanentUnique should be used
- To know how many unique users complete the Game Stage in 24 Hours, onCustomUnique should be used
For the unique event following code needs to be implemented
/** public void onGameStageCompleted(View view) { * Daily Unique event allows to keep an event unique for current date * When user completes Game Stage */ Map<String, String> params = new HashMap<String, String>();} /** public void onGameStageCompletedUnique(View view) { * Permanent Unique event allows to keep an event unique for user lifetime */ Map<String, String> params = new HashMap<String, String>();} /** public void onCategoryInternationalNewsClicked(View view) { * Custom Unique event allows to keep an event unique for user defined time (hours) */ Map<String, String> params = new HashMap<String, String>();} |
As the events are different and AdGyde Server needs to differentiate that the event is unique event, therefore events need to be added in Dashboard with specified type.
Please follow instructions below to create unique event
- Login to AdGyde Dashboard
- Open Setup Page from Left Navigation Menu
- Click on Manage Events under Events option
- Click on 'Create an Event' button on Top right Corner
- Select your Application Name
- Select 'Unique' under Type field
- Enter event_id as 'gamelevelcomplete', this should be same as first parameter of AdGyde.onDailyUnique(String, Map<String, String>) or onPermanentUnique or onCustomUnique
- Enter 'level' on parameter_name field
- Click on 'Create' button