Skip to content
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

Analytics Regression from Observable Refactor #2334

Closed
4 of 5 tasks
Stanzilla opened this issue Feb 23, 2021 · 2 comments · Fixed by aws/jsii#2693, hacf-fr/awesome-francophone-home-assistant#106 or JosephMontoya-TRI/BEEP#3
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@Stanzilla
Copy link
Contributor

Stanzilla commented Feb 23, 2021

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

Quote from Gitter:

Could be related to:

/* Send page view on location change */
if (typeof location$ !== "undefined")
location$.subscribe(function(url) {
ga("send", "pageview", url.pathname)
})

But rather not, the location observable should only emit on instant load. Could you patch the partial and see whether it triggers with instant loading disabled?
Ah yeah, wait. I see 2 calls to their collect endpoint. Could be related. Could you open an issue? I can look into it tomorrow.

Expected behavior

Only one call to endpoint

Actual behavior

2 calls

Steps to reproduce the bug

  1. ...
  2. ...
  3. ...

Package versions

  • Python: 3.9
  • MkDocs: 7
  • Material: 1.1.2

Project configuration

The contents of your mkdocs.yml

System information

  • OS: ...
  • Browser: ...
@squidfunk
Copy link
Owner

squidfunk commented Feb 24, 2021

Thanks for reporting! Fixed in 1864463. The location$ subject emitted the original location and location changes. This is now changed, as it will only emit changes, which is necessary for instant loading. The document$ observable continues to emit on initial load, as well as on subsequent loads.

@squidfunk squidfunk added resolved Issue is resolved, yet unreleased if open bug Issue reports a bug labels Feb 24, 2021
@squidfunk
Copy link
Owner

Released as part of 7.0.1.

This was referenced Mar 8, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment