diff --git a/docs/app.js b/docs/app.js index 148e5fd5..593ec9fe 100644 --- a/docs/app.js +++ b/docs/app.js @@ -9,3 +9,11 @@ exports.loadContext = function(callback) { } return callback(context); }; + +exports.onRouteChange = function(state) { + if (typeof window !== "undefined" && window.ga) { + window.ga('send', 'pageview', { + page: state.pathname + }); + } +} diff --git a/docs/config.toml b/docs/config.toml index 441ef8fd..569605d9 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -1,4 +1,5 @@ siteTitle = "Graphene" +ga = "UA-12613282-7" [docs.quickstart] name = "Quickstart" diff --git a/docs/html.js b/docs/html.js index 18c59088..f126f69e 100644 --- a/docs/html.js +++ b/docs/html.js @@ -5,7 +5,7 @@ export default class Html extends React.Component { render() { var title = this.props.title || DocumentTitle.rewind(); return ( - +
@@ -18,6 +18,16 @@ export default class Html extends React.Component { + {this.props.config.ga?:null} ); diff --git a/docs/static/graphene.appcache b/docs/static/graphene.appcache deleted file mode 100644 index c5ec2e45..00000000 --- a/docs/static/graphene.appcache +++ /dev/null @@ -1,7 +0,0 @@ -CACHE MANIFEST -# 2015-11-27 v1.0.0 -/playground/lib/pypyjs.vm.js -/playground/lib/pypyjs.vm.js.zmem - -NETWORK: -*