Permalink
Browse files

Adding Google Analytics tracking code.

  • Loading branch information...
1 parent 7fb6b82 commit 6808b2eab21f5d6ab4e10c8889f60092445719a9 @akoprow committed Nov 24, 2011
Showing with 12 additions and 2 deletions.
  1. +12 −2 src/page.opa
View
@@ -19,11 +19,18 @@ Page = {{
*/
fourOfour() = default({ some = "fourofour"}, <h1>404</h1>)
-
+
+ decorate(xhtml) =
+ <>
+ {xhtml}
+ <script src="http://opalang.org/google_analytics.js" />
+ </>
+
default(idOpt: option(string), content) =
(
id = Option.default("", idOpt)
Resource.styled_page("Chess", style,
+ decorate(
<div id="{id}" class="container">
<div id="error_container" class="error_container no_errors">
<ul id="errors"></ul>
@@ -32,6 +39,7 @@ Page = {{
{content}
</div>
</div>
+ )
)
)
@@ -71,6 +79,7 @@ Page = {{
_)
Resource.styled_page("Chess", style,
+ decorate(
<div id="lobby" class="container">
<div id="error_container" class="error_container no_errors">
<ul id="errors"></ul>
@@ -103,6 +112,7 @@ Page = {{
</form>
</div>
</div>
+ )
)
), User.login_view())
@@ -115,4 +125,4 @@ Page = {{
do Dom.add_class(#error_container,"has_errors")
do Dom.remove_content(#errors)
List.iter( x -> Dom.transform([#errors +<- <li>{x}</li>]), xs)
-}}
+}}

0 comments on commit 6808b2e

Please sign in to comment.