diff --git a/assets/javascripts/lib/page.coffee b/assets/javascripts/lib/page.coffee index 7a22e3db..886a96ff 100644 --- a/assets/javascripts/lib/page.coffee +++ b/assets/javascripts/lib/page.coffee @@ -41,6 +41,7 @@ page.show = (path, state) -> currentState = context.state page.dispatch(context) context.pushState() + ga?('send', 'pageview', location.pathname + location.search + location.hash) context page.replace = (path, state, skipDispatch, init) -> @@ -49,6 +50,7 @@ page.replace = (path, state, skipDispatch, init) -> currentState = context.state page.dispatch(context) unless skipDispatch context.replaceState() + ga?('send', 'pageview', location.pathname + location.search + location.hash) unless init context page.dispatch = (context) -> diff --git a/views/app.erb b/views/app.erb index ed2d87ee..fc795e5d 100644 --- a/views/app.erb +++ b/views/app.erb @@ -30,5 +30,10 @@ <% if App.production? %><% end %>