Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
solso committed Feb 26, 2016
1 parent 3216a37 commit a028812
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def any(path):
if path == 'frame':
context = {}
context['tracker_host'] = TRACKER_HOST
context['site4'] = VALID_HOSTS[3]
context['site5'] = VALID_HOSTS[4]
for v, i in zip(VALID_HOSTS, range(0, len(VALID_HOSTS))):
context['site{}'.format(i+1)] = v
if ACCELERATE > 1:
context['accelerate'] = {'speed': ACCELERATE, 'start_time': start_time}
return render_template('/template_frame.html', context=context)
Expand Down
10 changes: 9 additions & 1 deletion src/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ div#desc {
text-shadow: none;
}

.rr {
height: 100px;
}

.fill {
min-height: 100%;
height: 100%;
}

.description {
text-shadow: none;
text-align: left;
Expand All @@ -47,7 +56,6 @@ div#desc {
font-weight: normal;
font-size: 14px;
color: #000;

}

.links {
Expand Down
9 changes: 8 additions & 1 deletion src/templates/template_frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
var timestamp_by_hour = timestamp.slice(0,10);
var timestamp_by_day = timestamp.slice(0,8);

var o = localStorage.getItem('gt:count')
if (!o) o = 0;
else o = parseInt(o);
o+=1;
localStorage.setItem('gt:count', o)
console.log('>>>>>' , o, localStorage.length);

var tmp = url.replace('http://','').split('/');
var site = tmp[0], page = '/'+tmp.splice(1,tmp.length).join('/');

Expand Down Expand Up @@ -411,7 +418,7 @@
// drains the battery. With the client-side aggregation proposed by Green-tracker, beacons are
// no longer necessary as we will see in the following example.
//
var monitoringSites = ['site1.com'];
var monitoringSites = ['{{ context.site1 }}'];

if (monitoringSites.indexOf(site)!=-1) {
// The user is at site1.com, the only site for which we want aggregated statistics per user.
Expand Down
2 changes: 1 addition & 1 deletion src/templates/template_log.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</head>

<body>
<div class="row container-fluid">
<div class="row container-fluid rr">
<h1>Green-tracker Privacy Preserving Analytics Report</h1>

{% if context.canned_report %}
Expand Down
5 changes: 2 additions & 3 deletions src/templates/template_sites.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ <h3>Privacy Preserving Tracking</h3>
<ul>
<li>Unique visits and page loads.
<li>Returning customers.
<li>Goal conversion, to track campaigns.
<li>Goal conversion to track campaigns.
<li>Cross site correlations.
<li>In-site click-throughs.
<li>Average time on page by user.
<li>Visits and time in page per user (without beacons).
</ul>

<p> Feel free to click around to simulate you are browsing the Web, you can use
Expand All @@ -101,7 +101,6 @@ <h3>Privacy Preserving Tracking</h3>
<li><a href="http://{{context.tracker_host}}/introspect/localstorage">Your footprint of green-tracker localStorage</a>
</ul>

</ul>
</div>
</div>

Expand Down

0 comments on commit a028812

Please sign in to comment.