Index: modules/statsmaster/files/usercounts.html |
=================================================================== |
--- a/modules/statsmaster/files/usercounts.html |
+++ b/modules/statsmaster/files/usercounts.html |
@@ -97,16 +97,18 @@ |
var hits = intervals[interval].hits; |
for (var i = Math.max(offset, 0); i < data.length; i++) |
{ |
if (i - offset < 30 && i - offset + days >= 30) |
data[i]["30day " + type] += hits; |
if (i - offset < 7 && i - offset + days >= 7) |
data[i]["7day " + type] += hits; |
+ if (i - offset < 1 && i - offset + days >= 1) |
+ data[i]["1day " + type] += hits; |
} |
} |
} |
var month = zeroPad(date.getFullYear(), 4) + zeroPad(date.getMonth() + 1, 2); |
if (month != curMonth) |
{ |
doDownload("/raw/subscription/" + month + "/exceptionrules.txt.json", "acceptable ads data for month " + month, function(json) |
@@ -144,16 +146,19 @@ |
resultBody.removeChild(resultBody.lastChild); |
for (var i = 0; i < data.length; i++) |
{ |
var date = new Date(fromDate.getTime() + i * MILLIS_IN_DAY); |
var row = document.createElement("tr"); |
createCell(row, date.toLocaleDateString()); |
+ createCell(row, data[i]["1day total"].toLocaleString()); |
+ createCell(row, data[i]["1day acceptable"].toLocaleString()); |
+ createCell(row, (100 - data[i]["1day acceptable"] / data[i]["1day total"] * 100).toFixed(2) + "%"); |
createCell(row, data[i]["7day total"].toLocaleString()); |
createCell(row, data[i]["7day acceptable"].toLocaleString()); |
createCell(row, (100 - data[i]["7day acceptable"] / data[i]["7day total"] * 100).toFixed(2) + "%"); |
createCell(row, data[i]["30day total"].toLocaleString()); |
createCell(row, data[i]["30day acceptable"].toLocaleString()); |
createCell(row, (100 - data[i]["30day acceptable"] / data[i]["30day total"] * 100).toFixed(2) + "%"); |
resultBody.appendChild(row); |
} |
@@ -191,17 +196,17 @@ |
{ |
var tmp = fromDate; |
fromDate = toDate; |
toDate = tmp; |
} |
var data = []; |
for (var d = fromDate; formatDate(d) <= formatDate(toDate); d = new Date(d.getTime() + MILLIS_IN_DAY)) |
- data.push({"7day total": 0, "7day acceptable": 0, "30day total": 0, "30day acceptable": 0}); |
+ data.push({"1day total": 0, "1day acceptable": 0, "7day total": 0, "7day acceptable": 0, "30day total": 0, "30day acceptable": 0}); |
var offset = -30; |
var callback = function() |
{ |
offset++; |
if (offset >= data.length) |
{ |
showResults(fromDate, data); |
@@ -233,16 +238,17 @@ |
</form> |
</p> |
<p id="wait" hidden> |
Please wait, data is being fetched... |
</p> |
<table id="result" hidden> |
<tr> |
<th rowspan="2">Date</th> |
+ <th colspan="3">1-day active users</th> |
<th colspan="3">7-day active users</th> |
<th colspan="3">30-day active users</th> |
</tr> |
<tr> |
<th>Total</th> |
<th>Acceptable ads</th> |
<th>Opt-out rate</th> |
<th>Total</th> |