Skip to content

Instantly share code, notes, and snippets.

@jonalter
Created July 7, 2011 05:28
Show Gist options
  • Select an option

  • Save jonalter/1068933 to your computer and use it in GitHub Desktop.

Select an option

Save jonalter/1068933 to your computer and use it in GitHub Desktop.
Analytics Test App
Titanium.UI.setBackgroundColor('#fff');
// create tab group
var win = Ti.UI.createWindow({
layout: 'vertical'
});
var testOneButtonA = Ti.UI.createButton({
title: "featureEvent.android",
height: 50,
width: 250,
top: 20
});
testOneButtonA.addEventListener('click', function(e){
Ti.Analytics.featureEvent('featureEvent.android');
});
var testTwoButtonA = Ti.UI.createButton({
title: "navEvent.android",
height: 50,
width: 250,
top: 20
});
testTwoButtonA.addEventListener('click', function(e){
Ti.Analytics.navEvent('here', 'there', 'navEvent.android');
});
var testOneButtonI = Ti.UI.createButton({
title: "featureEvent.iphone",
height: 50,
width: 250,
top: 20
});
testOneButtonI.addEventListener('click', function(e){
Ti.Analytics.featureEvent('featureEvent.iphone');
});
var testTwoButtonI = Ti.UI.createButton({
title: "navEvent.iphone",
height: 50,
width: 250,
top: 20
});
testTwoButtonI.addEventListener('click', function(e){
Ti.Analytics.navEvent('here', 'there', 'navEvent.iphone');
});
win.add(testOneButtonA);
win.add(testTwoButtonA);
win.add(testOneButtonI);
win.add(testTwoButtonI);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment