Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add support for disabling tracking via localStorage #105

Merged
merged 4 commits into from
May 20, 2024

Conversation

supermar1010
Copy link
Contributor

@supermar1010 supermar1010 commented May 18, 2024

Added support for disabling tracking via localStorage(umami.disabled=1) (#103)

@supermar1010 supermar1010 changed the title Added support for disabling tracking via localStorage(umami.disabled=1) Added support for disabling tracking via localStorage(umami.disabled=1) (#103) May 18, 2024
@supermar1010 supermar1010 changed the title Added support for disabling tracking via localStorage(umami.disabled=1) (#103) Added support for disabling tracking via localStorage(umami.disabled=1) May 18, 2024
@ijkml
Copy link
Owner

ijkml commented May 19, 2024

Thank you, Mario.
Looks great, I'll review and merge as soon as I can 👍.

@ijkml
Copy link
Owner

ijkml commented May 19, 2024

LGTM 👍.
Changes I made were mostly to the playground (changed the button to a toggle).
Let's merge when you're ready.

@ijkml ijkml linked an issue May 19, 2024 that may be closed by this pull request
location: { hostname },
} = window;
const hostname = window.location.hostname;
const storage = window.localStorage;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly not sure what the difference in access between window.localStorage and just using localStorage is, but I also can't find any information on the internet about this, so if this also works, I don't have an oponion :D

@supermar1010
Copy link
Contributor Author

Looks good to me (just see the comment I'm not sure about the difference between the localStorage call via window and without, but if it works it's fine for me!)

@ijkml ijkml changed the title Added support for disabling tracking via localStorage(umami.disabled=1) feat: add support for disabling tracking via localStorage May 20, 2024
@ijkml ijkml merged commit 7479765 into ijkml:main May 20, 2024
@ijkml ijkml mentioned this pull request May 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable analytics for specific browsers
2 participants