diff --git a/docs/configuring.rst b/docs/configuring.rst
index d7dcaf36f..7e22c5b0e 100644
--- a/docs/configuring.rst
+++ b/docs/configuring.rst
@@ -13,7 +13,7 @@ For example:
.. code:: python
html_theme_options = {
- 'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard
+ 'analytics_id': 'G-XXXXXXXXXX', # Provided by Google in your dashboard
'analytics_anonymize_ip': False,
'logo_only': False,
'display_version': True,
@@ -96,11 +96,13 @@ Miscellaneous options
.. confval:: analytics_id
- If specified, Google Analytics' javascript is included in your pages.
- Set the value to the ID provided to you by google (like ``UA-XXXXXXX``).
+ If specified, Google Analytics' `gtag.js`_ is included in your pages.
+ Set the value to the ID provided to you by google (like ``UA-XXXXXXX`` or ``G-XXXXXXXXXX``).
:type: string
+ .. _gtag.js: https://developers.google.com/gtagjs
+
.. confval:: analytics_anonymize_ip
Anonymize visitor IP addresses in Google Analytics.
diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html
index a61e51be8..2ca84a69a 100644
--- a/sphinx_rtd_theme/layout.html
+++ b/sphinx_rtd_theme/layout.html
@@ -219,17 +219,15 @@
{%- if not READTHEDOCS %}
{%- if theme_analytics_id %}
+
{%- endif %}