mirror of
https://github.com/Kugelschieber/marvinblum.git
synced 2026-01-18 06:40:27 +00:00
Added relative statistics to tracking page.
This commit is contained in:
@@ -143,7 +143,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Browser</th>
|
||||
<th>Visitors</th>
|
||||
<th>Absolute</th>
|
||||
<th>Relative</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -151,6 +152,7 @@
|
||||
<tr>
|
||||
<td>{{if $data.Browser.Valid}}{{$data.Browser.String}}{{else}}(unknown){{end}}</td>
|
||||
<td>{{$data.Visitors}}</td>
|
||||
<td>{{round (multiply $data.RelativeVisitors 100)}} %</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
@@ -162,7 +164,8 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>OS</th>
|
||||
<th>Visitors</th>
|
||||
<th>Absolute</th>
|
||||
<th>Relative</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -170,6 +173,7 @@
|
||||
<tr>
|
||||
<td>{{if $data.OS.Valid}}{{$data.OS.String}}{{else}}(unknown){{end}}</td>
|
||||
<td>{{$data.Visitors}}</td>
|
||||
<td>{{round (multiply $data.RelativeVisitors 100)}} %</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
@@ -177,6 +181,9 @@
|
||||
</section>
|
||||
<section>
|
||||
<h2>Platform</h2>
|
||||
<canvas id="platform" class="tracking"></canvas>
|
||||
</section>
|
||||
<section>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -256,6 +263,21 @@
|
||||
}
|
||||
});
|
||||
|
||||
new Chart(document.getElementById('platform').getContext('2d'), {
|
||||
type: "doughnut",
|
||||
data: {
|
||||
labels: ["Desktop", "Mobile", "(unknown)"],
|
||||
datasets: [{
|
||||
backgroundColor: ["#515151", "#7f7f7f", "#dbdbdb"],
|
||||
borderColor: ["#515151", "#7f7f7f", "#dbdbdb"],
|
||||
data: [
|
||||
{{round (multiply .Platform.PlatformDesktopRelative 100)}},
|
||||
{{round (multiply .Platform.PlatformMobileRelative 100)}},
|
||||
{{round (multiply .Platform.PlatformUnknownRelative 100)}}]
|
||||
}]
|
||||
}
|
||||
});
|
||||
|
||||
{{range $i, $data := .PageVisits}}
|
||||
new Chart(document.getElementById('pageVisits{{$i}}').getContext('2d'), {
|
||||
type: "line",
|
||||
|
||||
Reference in New Issue
Block a user