Analytics
The VouchrSDK allows tracking of analytics events via the AnalyticsManager
. The VouchrSDK doesn’t track any events itself, instead delegating back anytime an internal event is logged.
To receive analytic events, do the following:
Have a class implement the AnalyticsManager
.
public class GoogleAnalyticsImp implements AnalyticsManager {
public void startup(Context context) {}
public void shutdown() {}
public void trackTimedEvent(String event, Map<String, String> eventParams) {}
public void stopTimedEvent(String event, Map<String, String> eventParams) {}
public void track(String event, Map<String, String> eventParams) {}
public void trackScreen(Activity activity, String screenName) {}
public void onLogin() {}
public void onStop(Context context) {}
public void onDestroy(Context context) {}
}
class GoogleAnalyticsImp : AnalyticsManager {
fun startup(context: Context) {}
fun shutdown() {}
fun trackTimedEvent(event: String, eventParams: Map<String, String>) {}
fun stopTimedEvent(event: String, eventParams: Map<String, String>) {}
fun track(event: String, eventParams: Map<String, String>) {}
fun trackScreen(activity: Activity, screenName: String) {}
fun onLogin() {}
fun onStop(context: Context) {}
fun onDestroy(context: Context) {}
}
Add the analyticsManager in VouchrEngine to your class.
Engine.Builder builder = new Engine.Builder(serverUrl, sdkId);
builder.addAnalyticsManagers(new GoogleAnalytics());
...
builder.build();
val builder = Engine.Builder(serverUrl, sdkId)
builder.addAnalyticsManagers(new GoogleAnalytics())
...
builder.build()
Screen Specific Analytics
The following tables contain a list of individual actions that are tracked on the corresponding screen. The Event Tag
is the tag that will be logged, along with any parameters listed under Properties
Create Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Create Screen Time | Create_Voucher_ScreenTime | n/a | Logs the amount of time spent on the create screen in seconds |
Enter Create Screen | Create_Voucher_Enter | n/a | Logged when the user enters the create screen |
Cancel Create | Create_Voucher_Cancel | n/a | Logged when the user cancels the create flow |
Choose Personalization Item | Create_Voucher_PersonalizationTapped | personalizationType | Logged when the user taps a personalization item |
Swipe Personalization Carousel | Create_Voucher_PersonalizationSwiped | personalizationType | Logged when the user swipes the personalization carousel |
Personalization Picked | Create_Voucher_PersonalizationPicked | personalizationType | Logged when an item drops into the envelope |
Preview Tapped | Create_Voucher_PreviewTapped | n/a | Logged when the user taps the preview button |
Move Envelope | Create_Voucher_EnvelopeDragged | n/a | Logged when the user holds & drags the envelope |
Tap on Envelope (Wrapping) | Create_Voucher_EnvelopeTapped | n/a | Logged when the user taps on the envelope |
Next Pressed | Create_Voucher_NextTapped | n/a | Logged when the user taps next on the create screen |
Edit Tapped | Create_Voucher_EditTapped | n/a | Logged when the user taps the edit button on the envelope |
Recipient Entry Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Recipient Screen Time | Create_Voucher_GiftTag_ScreenTime | n/a | Logs the amount of time spent on this screen in seconds |
Entered Recipient Screen | Create_Voucher_GiftTag_Enter | n/a | Logged when user enters the recipient selection screen |
Done Button Tapped | Create_Voucher_GiftTag_Done | customizedRecipient (true/false) customizedOpenDate (true/false) customizedMessage (true/false) |
Logged when the user presses done on the recipient selection screen |
Close Button Tapped | Create_Voucher_GiftTag_Close | n/a | Logged when the user presses the ‘x’ on the recipient selection screen |
Info Button Tapped | Create_Voucher_GiftTag_InfoTapped | n/a | Logged when the user presses the info button on the recipient selection screen |
Choose a Recipient Type | Create_Voucher_GiftTag_ChoosePerson | recepientType {Person, Contest} | Logged when the user chooses a Recipient Type - Person (sent to an individual) or Contest (sent as an open invite, first person to retrieve the gift can claim it) |
Undo Picking a Recipient | Create_Voucher_GiftTag_RemovePerson | n/a | Logged when the user removes the recipient they chose |
Open Date Tapped | Create_Voucher_GiftTag_OpenDateTapped | n/a | Logged when the user taps the open date |
Open Date Changed | Create_Voucher_GiftTag_OpenDateChanged | n/a | Logged when the user selects a new open date |
Wrapping Paper Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Wrapping Paper Entered Screen | Create_Voucher_GiftWrapScreen_EnteredScreen | n/a | Logged when user enters the wrapping paper selection screen |
Wrapping Personalization Screen Time | Create_Voucher_GiftWrapScreen_ScreenTime | n/a | Logs the amount of time spent on the wrapping paper screen in seconds |
Google Images Search | Create_Voucher_GiftWrapScreen_Search | searchTerm | Logged when the user searches Google for a wrapping paper image(emoji, keyword, carousel category) |
Picked a Custom Wrapping Paper | Create_Voucher_GiftWrapScreen_PickedCustomPaper | n/a | Logged when the user picks a wrapping paper that was searched for (not one of the defaults) |
Picked a Default Wrapping Paper | Create_Voucher_GiftWrapScreen_PickedDefaultPaper | n/a | Logged when the user picks a default wrapping paper |
Searched Emoji | Create_Voucher_GiftWrapScreen_SearchedEmoji | emojiTerm | Logged when the user chooses one of the search emojis |
Category Change | Create_Voucher_GiftWrapScreen_CategoryChanged | categoryTitle | Logged when the user scrolls the carousel to a new category |
Youtube Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Youtube Personalization Screen Time | Create_Voucher_Youtube_ScreenTime | n/a | Logs the amount of time spent on the Youtube screen in seconds |
Enter Youtube Screen | Create_Voucher_Youtube_Enter | n/a | Logged when the user enters the Youtube search screen |
Close Button Tapped | Create_Voucher_Youtube_Exit | videoId | Logged when the user exits the Youtube search screen |
Play Video | Create_Voucher_Youtube_PlayVideo | n/a | Logged when the user plays a Youtube video |
Play Closed | Create Voucher_Youtube_PlayClosed | videoId | Logged when the user closes the video preview |
Search for Videos | Create_Voucher_Youtube_SearchVideos | searchTerm | Logged when the user searches for videos |
Choose Video | Create_Voucher_Youtube_PickVideo | startTime, endTime | Logged when the user adds a video to their gift |
Clip Video | Create_Voucher_Youtube_ClipVideo | n/a | Logged when the user clips a video to a different length |
Record Sound Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Sound Recorder Screen Time | Create_Voucher_SoundRecord_ScreenTime | n/a | Logs the amount of time spent on this screen in seconds |
Enter Recording Screen | Create_Voucher_SoundRecord_Enter | n/a | Logged when the user enters the record sound screen |
Exit Recording Screen | Create_Voucher_SoundRecord_Exit | n/a | Logged when the user exits the record sound screen |
Record a Sound | Create_Voucher_SoundRecord_RecordSound | n/a | Logged when the user taps “record” |
Replay a Sound | Create_Voucher_SoundRecord_PlaySound | n/a | Logged when the user taps “play” |
Select Recording | Create_Voucher_SoundRecord_SelectRecording | n/a | Logged when the user selects the sound they recorded |
Restart Recording | Create_Voucher_SoundRecord_Restart | n/a | Logged when the user selects the ‘x’ to re-record |
Deny Microphone Permission | Create_Voucher_SoundRecord_DenyPermission | n/a | Logged when the user denies microphone permission |
Browse Sound Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
ScreenTime | Create_Voucher_SoundSelection_ScreenTime | n/a | The amount of time spent on the sound selection screen in seconds |
Cancel Button Pressed | Create_Voucher_SoundSelection_Cancel | n/a | Logged when the user dismisses the sound selection screen |
Plus Button Tapped | Create_Voucher_SoundSelection_PreselectSound | soundName | Logged when the user taps to add sound |
Add Button Tapped | Create_Voucher_SoundSelection_SelectSound | soundName | Logged when the user confirms they want the sound added |
Play Button Tapped | Create_Voucher_SoundSelection_PreviewedSound | soundName | Logged when the user previews the sound |
Note Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Note Screen Time | Create_Voucher_Note_ScreenTime | n/a | Logs the amount of time spent on this screen in seconds |
Add Note Tapped | Create_Voucher_Note_AddANote_Tapped | n/a | Logged when the user taps “Add a Note!” button |
Close Button Tapped | Create_Voucher_Note_Close_Tapped | n/a | Logged when the user taps the close button |
Change Font Tapped | Create_Voucher_Note_Font_Tapped | n/a | Logged when the user taps the font button |
Change Color Tapped | Create_Voucher_Note_Color_Tapped | n/a | Logged when the user taps the color button |
Sign Button Tapped | Create_Voucher_Note_Sign_Tapped | n/a | Logged when the user taps the “Sign” button |
Done Button Tapped | Create_Voucher_Note_Done_Tapped | messageLength, font, color | Logged when the user taps the done button - messageLength, font, and color of the completed note |
Cancel Button Tapped | Create_Voucher_Note_Cancel_Tapped | n/a | Logged when the user taps the cancel button |
Title Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Title Screen Time | Create_Voucher_Title_ScreenTime | n/a | Logs the amount of time spent on this screen in seconds |
Done Buttone Tapped | Create_Voucher_Title_Done_Tapped | title | Logged when the user taps the done button - title will be the string typed in by the user |
Cancel Button Tapped | Create_Voucher_Title_Cancel_Tapped | n/a | Logged when the user taps the cancel button |
Challenge Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Challenge Screen Time | Create_Voucher_Challenge_ScreenTime | n/a | Logs the amount of time spent on the Challenge screen in seconds |
Swipe Challenge Carousel | Create_Voucher_Challenge_Swipe | gameName | Logged when the user swipes left or right on the challenge carousel |
Challenge Preview Clicked | Create_Voucher_Challenge_preview_clicked | gameName | Logged when the user clicks the preview challenge button |
Challenge Selected | Create_Voucher_Challenge_select_clicked | gameName, difficulty | Logged when the user selects a challenge |
Challenge Cancelled | Create_Voucher_Challenge_cancel_clicked | n/a | Logged when the user dismisses the Challenge screen |
Image Editing Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Image Editing Screen Time | Voucher_PhotoEdit_ScreenTime | n/a | Logs the amount of time spent on the image editing screen in seconds |
Done Button Clicked | Voucher_PhotoEdit_NextButton_Tapped | n/a | Logged when the user taps the done button |
Cancel Button Clicked | Voucher_PhotoEdit_BackButton_Tapped | n/a | Logged when the user taps the cancel button |
Add Text Option | Voucher_PhotoEdit_AddText_Tapped | n/a | Logged when the user taps the add text button |
Add Text Screen Time | Voucher_PhotoEdit_AddText_ScreenTime | n/a | Logs the time the user spends in the add text option |
Draw Option | Voucher_PhotoEdit_Draw_Tapped | n/a | Logged when the user taps the draw button |
Draw Option Screen Time | Voucher_PhotoEdit_Draw_ScreenTime | n/a | Logs the time the user is on the draw tool option |
Payment Editing Personalization Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Payment Personalization Screen Time | Create_Voucher_Payment_ScreenTime | n/a | Logs the amount of time the user spends on the payment personalization screen |
Payment Screen Entered | Create_Voucher_Payment_Entered | n/a | Logged when the user enters the payment personalization screen |
Payment Screen Exited | Create_Voucher_Payment_Exited | n/a | Logged when the user exits the payment personalization screen |
Payment Selected | Create_Gift_type_confirm_clicked | giftType, paymentAmount, module, type | Logged when the user adds a payment to their gift |
Summary Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Summary Screen Screen Time | Create_Voucher_Summary_ScreenTime | n/a | Logs the amount of time the user spends on the summary screen |
Summary Screen Continue | Create_Summary_next_clicked | n/a | Logged when the user continues from the summary screen to the send screen |
Summary Screen Cancelled | Create_Summary_cancel_clicked | n/a | Logged when the user cancels the summary screen |
Edit Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Edit Screen Time | Create_Voucher_Edit_ScreenTime | n/a | Logs the amount of time spent on the Edit screen in seconds |
Personalization Deleted | Create_Voucher_Edit_PersonalizationDeleted | n/a | Logged when the user removes a personalization from the envelope |
Personalization Edited | Create_Voucher_Edit_PersonalizationEdited | n/a | Logged when the user modifies a personalization in the envelope |
Edit Closed | Create_Voucher_Edit_EditClosed | n/a | Logged when the user exits the edit screen |
Reveal Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Reveal Screen Entered | Reveal_Screen_Entered | n/a | Logged when the user opens the reveal screen |
Reveal Screen Open Button Tapped | Reveal_Screen_Item_Tapped | n/a | Logged when the user opens the gift by tapping the open button |
Reveal Screen Gift Package Tapped | Reveal_Screen_Next_Tapped | n/a | Logged when the user opens the gift by tapping the gift package |
Reveal Item Tapped | Reveal_Gift_Package_Tapped | itemType (Image/GiftCard/Title/Video/Youtube) | Logged when a user taps an item on the reveal screen |
Reveal Next Button Tapped | Reveal_Screen_Next_Tapped | n/a | Logged when a user clicks the next button to dismiss the reveal screen |
Challenge Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Claim Game Started | Claim_Game_started | difficulty | Logged when the user starts a game locking their gift |
Claim Game Won | Claim_game_won | score | Logged when the user has won the game locking their gift |
Claim Game Lost | Claim_Game_Lost | n/a | Logged when the user loses the game |
Claim Game Cancelled | Claim_game_cancelled | n/a | Logged when the user exits the game before completing it |
Calim Beg For Mercy | Claim_Game_beg_for_mercy | n/a | Logged when the user chooses to skip the game after they have lost |
Claim Game Score Shared Clicked | Game_score_shared_clicked | n/a | Logged when the user shares their score |
Discover Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Screen Time | Discover_Voucher_ScreenTime | n/a | The amount of time spent on this screen in seconds (Note: On mixpanel check the duration property) |
Enter screen | Discover_Voucher_Enter | n/a | when the user enters the Discover screen |
Cancel Discover | Discover_Voucher_Cancel | n/a | when the user exits the Discover flow |
Choose a template | Discover_Voucher_Template_Chosen | templateID, templateName, categoryID, categoryName | When a user taps on a template |
Template pagination | interaction Discover_Voucher_Template_Pagination | templateID, templateName, categoryID, categoryName | Fired when a user swipes thru a template preview on Discover |
Featured template choosen | Discover_Voucher_Feature_Template_Chosen | templateID, templateName, categoryID, categoryName |
Template Preview Screen
Description | Event Tag | Properties | Notes |
---|---|---|---|
Screen Time | Discover_Voucher_Template_Preview_ScreenTime | n/a | The amount of time spent on this screen in seconds (Note: On mixpanel check the duration property) |
Enter screen | Discover_Voucher_Template_Preview_Enter | templateID, templateName | when the user enters the Template Preview screen |
Cancel Discover | Discover_Voucher_Template_Preview_Cancel | templateID, templateName | when the user exits the Template Preview flow |
Deleted an asset | Discover_Voucher_Template_Preview_Deleted_Asset | templatedID, assetType | User deleted an asset |
Template chosen | Discover_Voucher_Template_Preview_Template_Selected | templateID, templateName | User picked a template to go to the next part of the flow with |