This document describes how to get started using the UI/UX Authoring tool Tracking SDK for Android. UI/UX Authoring tool is open source UX engine that gives you valuable insights into your application user, and much more, so you can optimize your strategy and experience of your application user.
Integrating UI/UX Authoring tool tracking into your Android app
Import the uiuxanalytics library into your Android app, then add this to your app build.gradle file: check the UIUXAnalyticsdemo as sample
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//.....
compile project(':uiuxanalytics')
}
Note: path to andoid sdk analytics/UIUXAnalyticsdemo/uiuxanalytics
Developers could manage the tracker lifecycle by themselves. To ensure that the matrics are not overcounted, it is highly recommended that the tracker be created and managed in the Application class.
import java.net.MalformedURLException;
public class YourApplication extends Application {
private Tracker uiuxanalayticstracker;
public synchronized Tracker getTracker(){
if (uiuxanalayticstracker != null) {
return uiuxanalayticstracker;
}
try {
uiuxanalayticstracker =
uiuxanalayticstracker.getInstance(this).newTracker("http://...../api/analytics/actionlog/", appID);
} catch (MalformedURLException e){
Log.w(Tracker.LOGGER_TAG, "url is malformed", e);
return null;
}
return uiuxanalayticstracker;
}
}
Note:use the app ID Created by UI/UX Authroing Tool Web Interface Don't forget to add application name to your AndroidManifest.xml file.
<application android:name=".YourApplication">
<!-- activities goes here -->
</application>
To send a screen view set the screen path and titles on the tracker
public class YourActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Tracker tracker = ((YourApplication) getApplication()).getTracker();
TrackHelper.track().screen("/your_activity").title("Title").with(tracker);
}
}
To collect data about user's interaction with interactive components of your app, like button presses or the use of a particular item in a application use trackEvent method.
TrackHelper.track().event("category",
"action").name("label").value(1000f).with(tracker);
To collect the exceptions and errors occrurred in the application use a TrackException method
TrackHelper.track().exception(new Exception("OnPurposeException")).description("Crash button").fatal(false).with(getTracker());
Allow to collect the data based on user id
((YourApplication) getApplication()).getTracker().setUserId("[email protected]");
UI/UX Authoring tool is web based UX engine that collects the user app usage behavior data by integrating the SDK in android applications. This is Django package, you must install Django befor using this package.
To get started with UI/UX Authoring tool analytics, the package must first be dowloaded from the repo then access the dowloaded folder via command line then run the follow command
pip install -r requirements.txt
- Django
- Django REST framework
After adding the 'ui_ux_authoring_tool' in your project setting, then run the following commands
$ python manage.py makemigrations
$ python manage.py migrate
In this implementation, we are contributing a Django Analytics for Andoird application.
- Name : Jamil Hussain , email : [email protected].
- Name : Anees ul Hassan , email : [email protected].
Copyright [2016] [Jamil Hussain]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.