Skip to content

Commit

Permalink
Add Analytics code to all templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
runpaint committed May 12, 2009
1 parent bb70c24 commit 68fb626
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 0 additions & 2 deletions TODO
Expand Up @@ -48,10 +48,8 @@ ACCENTED CHARACTERS
* If Prince supports it, add the examples column back into the table.

Web Version
* We want a general stylesheet, then one each for PDF and web which makes the relevant tweaks.
* Add icon to callouts.
* Add CC license fragment to recipe template.
* Link PDF from recipes?
* Gzip HTML.
* Add Atom feed of recipes sorted by ctime.
* Add Analytics to all templates.
11 changes: 11 additions & 0 deletions templates/chapter.html
Expand Up @@ -19,6 +19,17 @@ <h1><%= title %></h1>
<li><a href="/<%= r[:section_id] %>/<%= r[:id] %>/"><%= r[:title] %></a>
<% end %>
<ul>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."
: "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8774571-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>
<html>
11 changes: 11 additions & 0 deletions templates/recipe.html
Expand Up @@ -22,5 +22,16 @@
prev_e[:title] %></a> <a rel="next" href="/<%= next_e[:section_id] %>/<%= next_e[:id] %>/"><%=
next_e[:title] %> &nbsp; &#x21AA;</a></div>
<script type="text/javascript" src="/js/footnotes.js"></script>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."
: "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8774571-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>
11 changes: 11 additions & 0 deletions templates/toc.html
Expand Up @@ -34,5 +34,16 @@ <h1>Table of Contents</h1>
<% end
end %>
</ul>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl."
: "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8774571-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body>
</html>

0 comments on commit 68fb626

Please sign in to comment.