diff --git a/docs/upgrade.md b/docs/upgrade.md index 3cca843a6..e68f851f3 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -66,6 +66,31 @@ viewports]: [Tabbed]: setup/extensions/python-markdown-extensions.md#tabbed [better behavior on mobile viewports]: https://twitter.com/squidfunk/status/1424740370596958214 +#### `google_analytics` + +This option was [deprecated in MkDocs 1.2.0], as the implementation of a +JavaScript-based analytics integration is the responsibility of a theme. +The following lines must be changed: + +=== "8.x" + + ``` yaml + extra: + analytics: + provider: google + property: UA-XXXXXXXX-X + ``` + +=== "7.x" + + ``` yaml + google_analytics: + - UA-XXXXXXXX-X + - auto + ``` + + [deprecated in MkDocs 1.2.0]: https://www.mkdocs.org/about/release-notes/#backward-incompatible-changes-in-12 + ### Changes to `*.html` files { data-search-exclude } The templates have undergone a set of changes to make them future-proof. If diff --git a/material/partials/integrations/analytics.html b/material/partials/integrations/analytics.html index b895fa767..715e8c788 100644 --- a/material/partials/integrations/analytics.html +++ b/material/partials/integrations/analytics.html @@ -1,9 +1,6 @@ {#- This file was automatically generated - do not edit -#} -{% if config.google_analytics %} - {% set provider = "google" %} -{% endif %} {% if config.extra.analytics %} {% set provider = config.extra.analytics.provider %} {% endif %} diff --git a/material/partials/integrations/analytics/google.html b/material/partials/integrations/analytics/google.html index cebfd298e..1fbf86883 100644 --- a/material/partials/integrations/analytics/google.html +++ b/material/partials/integrations/analytics/google.html @@ -1,9 +1,6 @@ {#- This file was automatically generated - do not edit -#} -{% if config.google_analytics %} - {% set property = config.google_analytics[0] %} -{% endif %} {% if config.extra.analytics %} {% set property = config.extra.analytics.property | d("", true) %} {% endif %} diff --git a/src/partials/integrations/analytics.html b/src/partials/integrations/analytics.html index dfc367cf2..bbfe2fb9e 100644 --- a/src/partials/integrations/analytics.html +++ b/src/partials/integrations/analytics.html @@ -20,11 +20,6 @@ IN THE SOFTWARE. --> - -{% if config.google_analytics %} - {% set provider = "google" %} -{% endif %} - {% if config.extra.analytics %} {% set provider = config.extra.analytics.provider %} diff --git a/src/partials/integrations/analytics/google.html b/src/partials/integrations/analytics/google.html index 599d05537..62d3cbaaa 100644 --- a/src/partials/integrations/analytics/google.html +++ b/src/partials/integrations/analytics/google.html @@ -20,11 +20,6 @@ IN THE SOFTWARE. --> - -{% if config.google_analytics %} - {% set property = config.google_analytics[0] %} -{% endif %} - {% if config.extra.analytics %} {% set property = config.extra.analytics.property | d("", true) %}