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

Disabling Browser Cookies results in error #56

Closed
vlozanov opened this issue Nov 24, 2022 · 0 comments
Closed

Disabling Browser Cookies results in error #56

vlozanov opened this issue Nov 24, 2022 · 0 comments

Comments

@vlozanov
Copy link
Contributor

If browser cookies are disabled the module crashes with error "Failed to read the 'localStorage' property from 'Window': Access is denied for this document."
nuxt_web_vitals
When using only console logging this message is not relevant and the modules should keep logging vitals in the console.

src/runtime/utils.ts
export const KEY = 'ga:user' export const UID: string = (localStorage[KEY] = localStorage[KEY] || Math.random() + '.' + Math.random())

vlozanov pushed a commit to vlozanov/web-vitals that referenced this issue Nov 28, 2022
pi0 added a commit that referenced this issue Nov 29, 2022
* FIX: Disabling Browser Cookies results in error #56 pi0
- #56

* update impl

Co-authored-by: Vladimir Lozanov <Vladimir_Lozanov@vfc.com>
Co-authored-by: Pooya Parsa <pooya@pi0.io>
@pi0 pi0 closed this as completed Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants