forked from mrobinson/KitchenSinkDesktop
/
codec.xml
62 lines (52 loc) · 2.07 KB
/
codec.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<div class="module" name="Codec">
<div class="section" name="User">
<p>
Titanium allows you to fire five different types of analytics events
to our cloud services. The results from these events can be viewed
through our optional Analytics product (coming soon!).
</p>
<p>
User events allow you to generate simple analytics events that just
require an event name. You can also pass in a JSON-based data object
to attach to this event.",
</p>
<pre class="api_code"><code>
// Fire a user event and pass along a little extra information.
Titanium.Analytics.userEvent('my_event', {'login': true});
</code></pre>
</div>
<div class="section" name="Navigation">
Navigation Events allow you to track transitions from one part of
your app to another. You can pass in the from location, the to location,
the navigation event name, and an optional JSON data object.",
<pre class="api_code"><code>
// pass in from location, to location, event name and a JSON data object
Titanium.Analytics.navEvent('home', 'edit_account', 'view_account',
{'account_id':123});
</code></pre>
</div>
<div class="section" name="Settings">
Settings Events allow you track a specific setting or configuration
in your application. You can pass in the settings event name and an
optional JSON data object
<pre class="api_code"><code>
// pass in a setting name and a JSON data object
Titanium.Analytics.settingsEvent('volume', {'value':5});
</code></pre>
</div>
<div class="section" name="Timed">
Timed Events allow you track how long an specific activity or task takes
to complete in your application. You can pass in the timed event name,
start time, stop time, duration, and an optional JSON data object. The
start time and end time values should be in miliseconds via the JavaScript
Date object.
<pre class="api_code"><code>
// pass in a timed event name and a JSON data object
var startTime = new Date();
// Do some task like register for service and then do....
var endTime = new Date();
Titanium.Analytics.timedEvent('register', startTime, endTime, null,
{'email':'bob@aol.com'});
</code></pre>
</div>
</div>