From a58cb0aea6f2046c04593dc142037cc07a54359e Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 12 Mar 2016 13:21:06 +0100 Subject: [PATCH] Added documentation for Google Analytics integration --- docs/getting-started.md | 18 ++++++++++++++++++ docs/index.md | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 0f9460995..cf6cd16f4 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -179,6 +179,19 @@ extra: twitter: 'my-twitter-handle' ``` +### Google Analytics integration + +Material makes it easy to integrate site tracking with Google Analytics. +Besides basic tracking, clicks on all outgoing links can be tracked, clicks on +the download and star button, as well as how site search is used. Tracking can +be activated in your project's `mkdocs.yml`: + +``` yaml +google_analytics: + - 'UA-XXXXXXXX-X' + - 'auto' +``` + ### More advanced customization If you want to change the general appearance of the Material theme, see @@ -294,6 +307,11 @@ extra: github: 'my-github-handle' twitter: 'my-twitter-handle' +# Google Analytics +google_analytics: + - 'UA-XXXXXXXX-X' + - 'auto' + # Extensions markdown_extensions: - codehilite(css_class=code) diff --git a/docs/index.md b/docs/index.md index 5d6ce9f1d..9fdad9c4f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,8 +41,8 @@ theme: 'material' the screen is too small and well-defined print styles. - Extra configuration options like a [project logo][], links to the authors - [GitHub and Twitter accounts][] and display of the amount of stars the - project has on GitHub. + [GitHub and Twitter accounts][], display of the amount of stars the + project has on GitHub and [Google Analytics integration][]. - Easily [extendable and customizable][] due to a well-designed asset pipeline built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted @@ -60,6 +60,7 @@ it up and running. [project logo]: getting-started.md#adding-a-logo [easily customizable color palette]: getting-started.md#changing-the-color-palette [GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account +[Google Analytics integration]: getting-started.md#google-analytics-integration [extendable and customizable]: customization.md [Gulp]: http://gulpjs.com [SASS]: http://sass-lang.com \ No newline at end of file