-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Deprecate google_analytics config option. #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I haven't tested it but the proposal sounds great. I also like the extensible approach of |
The integration tests will continue to fail until we update our own config to use the new gtag (they build the docs in strict mode). In all other respects, this should be ready to go. |
@tomchristie can we get the Google Analytics account for https://mkdocs.org upgraded to V4 (as documented here)? We then need the diff --git a/mkdocs.yml b/mkdocs.yml
index f120128f..1aed065e 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -8,6 +8,7 @@ edit_uri: ""
theme:
name: mkdocs
+ analytics: {gtag: 'G-ABC123'}
highlightjs: true
hljs_languages:
- yaml
@@ -40,7 +41,6 @@ markdown_extensions:
repo: mkdocs
copyright: Copyright © 2014 <a href="https://twitter.com/_tomchristie">Tom Christie</a>, Maintained by the <a href="/about/release-notes/#maintenance-team">MkDocs Team</a>.
-google_analytics: ['UA-27795084-5', 'mkdocs.org']
plugins:
- search |
Hi guys, what is the status? Do you think this would be completed any time soon? |
@tomchristie can we upgrade the Google Analytics account as discussed above? If not, then we will need to work out some other solution to avoid the tests failing for the build of our own documentation. |
Right okay, this got buried. I'll put it on my TODO. |
@tomchristie sorry to pester you but this is the only issue blocking the next release. If we are not going to get this update, we need to know so that we can plan around it. |
Yes, that resolves it. Thank you. |
This implements the plan discussed in #2252.
On the built-in themes I added a new option
theme.analytics.gtag
. See the documentation for details. The idea is that multiple different services could be offered undertheme.analytics
. At this time only support forgtag
exists, but more could be added in the future.I made some changes and additions to the Deprecated option validator which still needs tests.
We also need to upgrade the Google Analytics account for https://mkdocs.org to use the new GA4 ID. Until we do, builds will issue a warning: