Added documentation for Google Analytics integration

This commit is contained in:
squidfunk 2016-03-12 13:21:06 +01:00
parent cf8e992c24
commit a58cb0aea6
2 changed files with 21 additions and 2 deletions

View File

@ -179,6 +179,19 @@ extra:
twitter: 'my-twitter-handle' 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 ### More advanced customization
If you want to change the general appearance of the Material theme, see If you want to change the general appearance of the Material theme, see
@ -294,6 +307,11 @@ extra:
github: 'my-github-handle' github: 'my-github-handle'
twitter: 'my-twitter-handle' twitter: 'my-twitter-handle'
# Google Analytics
google_analytics:
- 'UA-XXXXXXXX-X'
- 'auto'
# Extensions # Extensions
markdown_extensions: markdown_extensions:
- codehilite(css_class=code) - codehilite(css_class=code)

View File

@ -41,8 +41,8 @@ theme: 'material'
the screen is too small and well-defined print styles. the screen is too small and well-defined print styles.
- Extra configuration options like a [project logo][], links to the authors - Extra configuration options like a [project logo][], links to the authors
[GitHub and Twitter accounts][] and display of the amount of stars the [GitHub and Twitter accounts][], display of the amount of stars the
project has on GitHub. project has on GitHub and [Google Analytics integration][].
- Easily [extendable and customizable][] due to a well-designed asset pipeline - Easily [extendable and customizable][] due to a well-designed asset pipeline
built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted 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 [project logo]: getting-started.md#adding-a-logo
[easily customizable color palette]: getting-started.md#changing-the-color-palette [easily customizable color palette]: getting-started.md#changing-the-color-palette
[GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account [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 [extendable and customizable]: customization.md
[Gulp]: http://gulpjs.com [Gulp]: http://gulpjs.com
[SASS]: http://sass-lang.com [SASS]: http://sass-lang.com