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

Add telemetry to docs site #2363

Closed
ryankeairns opened this issue Sep 23, 2019 · 8 comments
Closed

Add telemetry to docs site #2363

ryankeairns opened this issue Sep 23, 2019 · 8 comments
Labels
chore documentation Issues or PRs that only affect documentation - will not need changelog entries stale-issue stale-issue-closed

Comments

@ryankeairns
Copy link
Contributor

In order to learn more about how people use the EUI docs, it would be great to start collecting some high-level data. A simple first step would be to add something like Google Analytics so that we can begin analyzing traffic within the site - see which component pages are visited the most, etc.

@ryankeairns ryankeairns added documentation Issues or PRs that only affect documentation - will not need changelog entries chore discussion labels Sep 23, 2019
@ryankeairns
Copy link
Contributor Author

@chandlerprall I have a GA snippet and presume I can just place it in here: https://github.com/elastic/eui/blob/master/docs/index.html , but I'm not familiar with the docs site build process.

Am I on the right track to just open a PR adding the <script> to this index.html file?

@chandlerprall
Copy link
Contributor

The docs/ directory is the built version, any changes you make there will be overridden. Instead, you want to add the script to https://github.com/elastic/eui/blob/master/src-docs/src/index.html

You can test your changes by running

yarn build && cd docs && python -m SimpleHTTPServer and (after waiting a few minutes for them to build) viewing the docs at http://127.0.0.1:8000

@ryankeairns
Copy link
Contributor Author

@chandlerprall prefect, thank you!!

@ryankeairns
Copy link
Contributor Author

ryankeairns commented Oct 9, 2019

@chandlerprall I've added the snippet to theeui/src-docs/src/index.html file, but when I run the command you shared above, it doesn't appear in the <head>. Am I in the right place? or is there some other place I need to make this change get into the build? Thanks!

@chandlerprall
Copy link
Contributor

Whoops, I gave you the wrong build command

yarn build-docs instead of yarn-build

so the whole command as a copy&paste:

yarn build-docs && cd docs && python -m SimpleHTTPServer

sorry about that!

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions
Copy link

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

@github-actions
Copy link

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore documentation Issues or PRs that only affect documentation - will not need changelog entries stale-issue stale-issue-closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants