diff options
author | raylu <raylu@mixpanel.com> | 2012-04-25 23:19:52 -0700 |
---|---|---|
committer | raylu <raylu@mixpanel.com> | 2012-04-25 23:19:52 -0700 |
commit | df71da70062b9f70d9906fa7df7350d47be79acc (patch) | |
tree | c6deaaa183640703fefb5068e02c7a2aa96aec68 /js/mapspecs.js | |
parent | c8783d4dc257913ba527d469c88d7b97770be3de (diff) | |
download | pathery-df71da70062b9f70d9906fa7df7350d47be79acc.tar.xz |
add tutorial and map difficulty tracking
Diffstat (limited to 'js/mapspecs.js')
-rw-r--r-- | js/mapspecs.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index c767db7..662d47c 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -31,7 +31,7 @@ var htmlscores = ''; var htmlnotification = '';
var jsonmapdata = new Object;
//var jsonmapdata.solutions = new Array();
-
+var mapType; // 1 = simple, 2 = normal, ...; used for mixpanel tracking
// function loadAllSolutions() {
// for(var i in jsonmapdata.solutions) {
@@ -206,7 +206,8 @@ function doSend(mapid) { mixpanel.track('click go', {
'speed': speed,
'mute': mute,
- 'mapid': mapid
+ 'mapid': mapid,
+ 'type': mapType
});
}
@@ -300,14 +301,15 @@ function request_path_done() { }
// Force score update.
-function updateScoresReq(mapid) {
+function updateScoresReq(mapid, type) {
//Get score update.
ajax.requestFile = "do.php?checkachieve=true&r=getscores&mapid="+mapid; //prepare strdata
ajax.onCompletion = updateScoresGet; // Specify function to be executed on response.
ajax.runAJAX();// Do it!
+ mapType = type;
}
function updateScoresGet() {
- JO = decryptJSON(ajax.response);
+ var JO = decryptJSON(ajax.response);
updateDsp(JO.mapid, 'dspScore', JO.scores);
}
@@ -764,4 +766,3 @@ function minmap(obj) { setTimeout("de = false;", 1000);
}
//== End
-
|