-
Notifications
You must be signed in to change notification settings - Fork 25.6k
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
Disable analytics in development #1359
Comments
This could apply to the comments section as well. |
@maaz93 This sounds like a good idea to me if you want to go ahead and submit a PR. Maybe do them as two separate PRs... one for disabling Google Analytics in nonprod and another for disabling comments. You can probably piggyback on these lines
|
@mmistakes Sounds good! Should I create a separate issue for disabling the comments or can I use this issue itself for both PRs? |
You can reference this same issue. |
bundle update
.bundle exec jekyll build
.Environment informations
Expected behavior
I realised that my blog's page visits were being tracked even in development. This is adding wrong entries into the site analytics. I would expect that the theme has a way to disable analytics in development.
Just to solve the issue quickly, I added
if (window.location.hostname !== "localhost") { ... }
ingoogle-universal.html
.But, after searching a bit, I found that we can use
I would add this change in
analytics.html
.If you think this is a valid feature request, I wouldn't mind submitting a PR for this.
The text was updated successfully, but these errors were encountered: