Unified · Split
| @@ -41,8 +41,7 @@ page.show = (path, state) -> · 40 unmodified lines | |||
| 41 | currentState = context.state | 41 | currentState = context.state |
| 42 | page.dispatch(context) | 42 | page.dispatch(context) |
| 43 | context.pushState() | 43 | context.pushState() |
| 44 | ga?('send', 'pageview', location.pathname + location.search + location.hash) | 44 | track() |
| 45 | _gauges?.push(['track']) | ||
| 46 | context | 45 | context |
| 47 | 46 | ||
| 48 | page.replace = (path, state, skipDispatch, init) -> | 47 | page.replace = (path, state, skipDispatch, init) -> |
| @@ -51,8 +50,7 @@ page.replace = (path, state, skipDispatch, init) -> · 2 unmodified lines | |||
| 51 | currentState = context.state | 50 | currentState = context.state |
| 52 | page.dispatch(context) unless skipDispatch | 51 | page.dispatch(context) unless skipDispatch |
| 53 | context.replaceState() | 52 | context.replaceState() |
| 54 | ga?('send', 'pageview', location.pathname + location.search + location.hash) unless init | 53 | track() unless init or skipDispatch |
| 55 | _gauges?.push(['track']) | ||
| 56 | context | 54 | context |
| 57 | 55 | ||
| 58 | page.dispatch = (context) -> | 56 | page.dispatch = (context) -> |
| @@ -163,3 +161,8 @@ onclick = (event) -> · 104 unmodified lines | |||
| 163 | 161 | ||
| 164 | isSameOrigin = (url) -> | 162 | isSameOrigin = (url) -> |
| 165 | url.indexOf("#{location.protocol}//#{location.hostname}") is 0 | 163 | url.indexOf("#{location.protocol}//#{location.hostname}") is 0 |
| 164 | |||
| 165 | track = -> | ||
| 166 | ga?('send', 'pageview', location.pathname + location.search + location.hash) | ||
| 167 | _gauges?.push(['track']) | ||
| 168 | return | ||