X Tutup
Skip to content

Commit 64ffa1f

Browse files
committed
Add analytics tracking
1 parent 80e125a commit 64ffa1f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

templates/articleindex.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@
3131
{render("footer", this)}
3232
</div>
3333
<script src="/script.js"></script>
34+
<script type="text/javascript">
35+
36+
 var _gaq = _gaq || [];
37+
 _gaq.push(['_setAccount', 'UA-28563087-1']);
38+
 _gaq.push(['_trackPageview']);
39+
40+
 (function() {
41+
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
42+
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
43+
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
44+
 })();
45+
46+
</script>
3447
</body>
3548
</html>
3649

templates/frontindex.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ <h1><a href="/{_name}">{title}</a></h1>
5050
{render("footer", this)}
5151
</div>
5252
<script src="/script.js"></script>
53+
<script type="text/javascript">
54+
55+
 var _gaq = _gaq || [];
56+
 _gaq.push(['_setAccount', 'UA-28563087-1']);
57+
 _gaq.push(['_trackPageview']);
58+
59+
 (function() {
60+
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
61+
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
62+
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
63+
 })();
64+
65+
</script>
5366
</body>
5467
</html>
5568

0 commit comments

Comments
 (0)
X Tutup