mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
Allow Google Analytics to use gtag.js (#601)
* Moved google analytics script to head The code now uses the new gtag script to track the website on google analytics. The migration is explained [here](https://developers.google.com/analytics/devguides/collection/gtagjs/migration). This will help to solve issues such as #375. As indicated at https://support.google.com/analytics/answer/1008080 the analytics code must be placed in the head tag, so it is moved there. * Add a boolean to use the new gtag library * Update api-site-config.md
This commit is contained in:
parent
ae53bdc46a
commit
976ae770b5
3 changed files with 40 additions and 15 deletions
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue