Google Analytics missing when using Insiders
See original GitHub issue- I’ve read the contribution guidelines and agree with them
I’ve found a bug and checked that …
- … the problem doesn’t occur with the default MkDocs template
- … the problem is not in any of my customizations (CSS, JS, template)
- … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
The latest release of mkdocs-material (7.1.8) provided support for the new configuration layout of Google Analytics that mkdocs v1.2 introduced, i.e.
From:
config:
google_analytics:
- UA-xxxxxxxxx-x
- auto
To:
config:
extra:
analytics:
provider: google
property: UA-xxxxxxxxx-x
This works find with mkdocs-material but when publishing docs using insiders the analytics script is missing.
Expected behavior
The new analytics configuration layout should work with insiders
Actual behavior
The analytics script is missing when publishing docs using insiders.
Steps to reproduce the bug
Serve docs using mkdocs serve and see that the Google Analytics script is present in all pages.
Serve docs using insiders and the script is not present.
Package versions
- Python:
python --version
- Python 3.8.1 - MkDocs:
mkdocs --version
- mkdocs, version 1.2.1 from /usr/local/lib/python3.8/site-packages/mkdocs (Python 3.8) - Material:
pip show mkdocs-material | grep -E ^Version
- Version: 7.1.8
Project configuration
site_name: Lens Extension Development
site_description: Documentation for Lens Extension Development and API.
site_author: Mirantis, Inc.
site_url: https://api-docs.k8slens.dev
docs_dir: docs/
repo_name: GitHub
repo_url: https://github.com/lensapp/lens
copyright: Copyright © 2021 <a href="https://mirantis.com/">Mirantis Inc.</a> - All rights reserved.
edit_uri: ""
nav:
- Overview: README.md
- Getting Started:
- Overview: extensions/get-started/overview.md
- Your First Extension: extensions/get-started/your-first-extension.md
- Extension Anatomy: extensions/get-started/anatomy.md
- Wrapping Up: extensions/get-started/wrapping-up.md
- Extension Capabilities:
- Common Capabilities: extensions/capabilities/common-capabilities.md
- Styling: extensions/capabilities/styling.md
- Extension Guides:
- Overview: extensions/guides/README.md
- Generator: extensions/guides/generator.md
- Main Extension: extensions/guides/main-extension.md
- Renderer Extension: extensions/guides/renderer-extension.md
- Stores: extensions/guides/stores.md
- Working with MobX: extensions/guides/working-with-mobx.md
- Protocol Handlers: extensions/guides/protocol-handlers.md
- IPC: extensions/guides/ipc.md
- Testing and Publishing:
- Testing Extensions: extensions/testing-and-publishing/testing.md
- Publishing Extensions: extensions/testing-and-publishing/publishing.md
- API Reference: extensions/api/README.md
theme:
name: 'material'
highlightjs: true
language: 'en'
custom_dir: docs/custom_theme
favicon: img/favicon.ico
logo: img/lens-logo-icon.svg
palette:
- scheme: slate
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
- scheme: default
toggle:
icon: material/toggle-switch
name: Switch to light mode
features:
- toc.autohide
- search.suggest
- search.highlight
extra_css:
- stylesheets/extra.css
plugins:
- search
markdown_extensions:
- pymdownx.highlight: {}
- pymdownx.superfences: {}
- pymdownx.inlinehilite: {}
- toc:
permalink: "#"
toc_depth: 3
- admonition: {}
- pymdownx.details: {}
extra:
generator: false
social:
- icon: fontawesome/brands/github
link: https://github.com/lensapp/lens
name: Lens on GitHub
- icon: fontawesome/brands/twitter
link: https://twitter.com/k8slens
name: Lens on Twitter
- icon: fontawesome/brands/slack
link: http://k8slens.slack.com/
name: Lens on Slack
- icon: fontawesome/solid/link
link: https://k8slens.dev/
name: Lens Website
version:
method: mike
analytics:
provider: google
property: UA-xxxxxxxxx-x
System information
-
OS: …
-
Browser: …
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
9 reasons why you have missing data in Google Analytics 4
Missing data in Google Analytics 4? There are many possible reasons and in this video, I will show you 9 of them.
Read more >How Much Data Are You Missing? - CM.com
To get an estimate of how much revenue you are missing in your Google Analytics: Open Conversions > Ecommerce > Overview; Compare the...
Read more >Missing Google Ads ad information in Analytics
When Analytics isn't able to join the Google Ads campaign information with the Analytics session information, then you see (not set) as the...
Read more >Paid Search Visits Not Showing Up in Google Analytics - Moz
With reports like Business Insiders Programmatic Ad Buying On Mobile Is Rising At An Incredibly Fast Clip, Here's What You Need To Know...
Read more >How to Use Google Analytics (Setup, Reporting & More) - Kinsta
Google Analytics can be powerful if you know how to use it. Learn how to set up Google Analytics to collect data and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will confirm the insiders version and try to reproduce.
Okay great, thanks for coming back here. There already is a deprecation path for the legacy settings, but I’ll recheck why that won’t be picked up in certain cases:
https://github.com/squidfunk/mkdocs-material/blob/b25e5f480eee677cbe472232d5c690e5a6886079/src/partials/integrations/analytics/google.html#L23-L26
I’ll close this issue as resolved.