-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Adding Google Analytics to doc pages? #709
Comments
I don't know if you guys have another ways to do that. But it will be a nice thing to know what parts of the documentation are more accessed because that way we can come to the conclusion that a specific module or a specific page is not well documented or that the people are using more or less a specific module and with that information the foundation can prioritise what is nice to work on. I don't know much about how you guys do things, so its just something that i thought. (And maybe the discussion about the local env its even better, that way we have even more data) |
@jasnell would a localhost check suffice? if (window.location.hostname !== 'localhost') {
// GA code inside here
} |
Not so much. If I'm on a private network and want to throw the docs up on @jasnell https://github.com/jasnell would a localhost check suffice? if (window.location.hostname !== 'localhost') { — Reply to this email directly or view it on GitHub |
Two server-side options using nginx. Both needs testing and I'd honestly like to avoid it seeing how we'd put a strain on our server(s), but lets get it in here for completeness.
|
This should be possible injecting as part of the deploy process though? |
@jbergstroem we could possibly do a $ NODE_ENV=production npm run build plus some changes in |
@phillipj should be feasible. |
Ohh I just realized this was a docs issue which has a different setup (in nodejs/node) than the website. Although $NODE_ENV could be a viable option anyway. |
So .. this can't be achieved directly out of this repo since this repo is completely unrelated to docs, they all come out of nodejs/node and we'd have to do something there, even if it's an SSI. And, since whatever way this is going to be achieved we're going to be serving modified documents in all of the docs/ directories in release directories then how about we take this back to the node repo and implement a special |
Oh, sorry, I see that @phillipj's PR is attempting to do this over there. Closing this as I don't think it makes sense to be here. |
See nodejs/node#6462 for context.
Original from @mikeal:
And my comment here:
The text was updated successfully, but these errors were encountered: