Description
As a stackable site admin, I want to install light user tracking to know which sites users visit and where they leave the site, to better understand where we should focus future work on, and also other insights such as which operators are most popular.
We have tracking on our main site, but not on the docs, leaving a 'blind spot'. A script needs to be added to the generated site.
While google analytics needs an API key, and the docs have info on that, we do not need an API key for our tracking solution. I think the URL where to send the analytics should still be configurable. Not only to not hardcode it in the UI code, but also to be able to leave it out and build the site without tracking for local building/testing.
This Ticket needs to be resolved in coordination with @stackfab (Fabian) to make the relevant changes in the tracking upstream, as well as monitor the tracking dashboard. Fabian also has a script snippet that needs to be used.
This ticket is done when:
-
I'd like to define the Tracking API URL as an environment variable in the github actions. If it is set, tracking is enabled with the given endpoint. -
pass in the API endpoint with the--key
flag in the build script https://github.com/stackabletech/documentation/blob/main/Makefile#L6 . make it conditional, so it's not passed in locally (as there will be no api endpoint defined locally) - the script has been added to the page templates (most likely here: https://github.com/stackabletech/documentation-ui/blob/stackable/src/partials/head-scripts.hbs) and is included on every docs site. it reads the API endpoint via handlebars
- we verified that stats are generated in the tracking tool (there is no staging)
- document how the tracking works in the documentation-ui and documentation readmes.
I decided to not pass in the URL. Instead I introduced an enable_tracking
key that is just set to true/false in the respective playbooks.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status