diff --git a/docs/api-site-config.md b/docs/api-site-config.md index a8c6232c43..ad5c3ca361 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -123,6 +123,8 @@ h1 { `gaTrackingId` - Google Analytics tracking ID to track page views. +`gaGtag` - Set this to `true` if you want to use [global site tags (gtag.js)](https://developers.google.com/gtagjs/) for Google analytics instead of `analytics.js`. + `highlight` - [Syntax highlighting](api-doc-markdown.md) options: - `theme` is the name of the theme used by Highlight.js when highlighting code. You can find the [list of supported themes here](https://github.com/isagalaev/highlight.js/tree/master/src/styles). diff --git a/lib/core/Head.js b/lib/core/Head.js index f25a0273e7..56e07266b9 100644 --- a/lib/core/Head.js +++ b/lib/core/Head.js @@ -95,6 +95,44 @@ class Head extends React.Component { title={this.props.config.title + ' Blog RSS Feed'} /> )} + {this.props.config.gaTrackingId && + this.props.config.gaGtag && ( +