Skip to end of metadata
Go to start of metadata

Mission: You will add breadcrumbs  to a application

Specification: In this lab, you will modify the app created in the preceding lab or download the initial version of the current lab to add breadcrumbs.

1. If you are starting this lab from scratch, download the initial file and get your API key from your appcelerator dashboard and added it to the tiapp.xml. Config your Node ACS Server, refer to Lab 8, steps 7,8 and 9 for more information.

2. You’ll need to first add the apm module using the following code in alloy.js:

This will make APM module available anywhere in the app, using the Alloy.Globals.apm variable.

3. Search through the app and add Alloy.Globals.apm.leaveBreadcrumb(“[breadcrumb message]”); wherever there is a need for user interaction to leave a trail of breadcrumbs to tracking user actions. Replace the [breadcrumb message] with appropriate message describing the user action.

4. We will now add analytics to the app that you will be able to view from the Appcelerator Dashboard.

5. Add Ti.Analytics.featureEvent(‘[App Feature]', {}); into the code to add analytics for that particular feature, replacing [App Feature] with the name of the feature itself.  For example, to add analytic to the Main Window of the watchList, add Ti.Analytics.featureEvent('', {});.

6. Now go to you appcelerator dashboard. Login and locate your MyStock application. Click on analytic > events. Here is the list of the event Occurrence in your application.

Download Completed Lab (Note that you will still need to update the ACS API key in TIAPP.xml for ACS to work correctly and config the Node ACS to for the watchList to work correctly.)

  • No labels