Skip to content

Commit 3745475

Browse files
committed
adding dl tracking to analytics
1 parent 1e92abd commit 3745475

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

offline.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h2>A simple way to make web stuff on Raspberry Pi.</h2>
4545
</div>
4646
<p>Coder is a free, open source project that turns a Raspberry Pi into a simple platform that educators and parents can use to teach the basics of building for the web. New coders can craft small projects in HTML, CSS, and Javascript, right from the web browser.
4747
</p>
48-
<a href="http://storage.googleapis.com/coder-images/coder_v0.4.zip" target="_blank" class="button inline">Download Coder</a>
48+
<a href="http://storage.googleapis.com/coder-images/coder_v0.4.zip" target="_blank" class="button inline trackdl" data-version="0.4">Download Coder</a>
4949
<p class="download-details inline">1.04GB | Coder v0.4<br/>Requires Raspberry Pi</p>
5050
<div class="clear"></div>
5151
</div>
@@ -158,7 +158,7 @@ <h3>Miniature WiFi (802.11b/g/n) Module for Pi</h3>
158158
<a name="download" class="anchor"></a>
159159
<h2>Download the Coder Raspberry Pi Image.</h2>
160160
<p>Once you've done your shopping, you'll need to download the Coder SD card image, and transfer it to your SD card. This is a big download, so it may take a few minutes.</p>
161-
<a class="download button" target="_blank" href="http://storage.googleapis.com/coder-images/coder_v0.4.zip">Download Coder</a>
161+
<a class="download button trackdl" data-version="0.4" target="_blank" href="http://storage.googleapis.com/coder-images/coder_v0.4.zip">Download Coder</a>
162162
<p class="download-details">Coder v0.4 | 1.04GB Download</p>
163163
<p class="last">An install program for Mac OS X is included, which will help you transfer the disk image to your SD Card. If you are using a PC, check out the instructions on the <a href="http://elinux.org/RPi_Easy_SD_Card_Setup#Using_Windows_7_or_Windows_XP">Raspberry Pi Wiki</a>. There are several utilities that will allow you to install the image.</p>
164164
</div>
@@ -278,6 +278,12 @@ <h3>Teach with Coder</h3>
278278
ga('create', 'UA-41998892-1', 'googlecreativelab.github.io');
279279
ga('send', 'pageview');
280280

281+
$(document).ready( funciton() {
282+
$('a.trackdl').click(function() {
283+
var version = $(this).attr('data-version');
284+
ga('send', 'event', 'download', 'click', version );
285+
});
286+
});
281287
</script>
282288
</body>
283289
</html>

0 commit comments

Comments
 (0)