Adding support to supply timestamp #2

Merged
merged 2 commits into from Sep 27, 2011
@@ -90,8 +90,8 @@ var client = function(token) {
metrics.track = function(event, properties, callback) {
if (!properties) { properties = {}; }
if (!properties.token) { properties.token = metrics.token; }
- properties.time = get_unixtime();
-
+ if (!properties.time) { properties.time = get_unixtime(); }
+
var data = {
'event' : event,
'properties' : properties