cli
cli copied to clipboard
INIT: Analytics to CLI Installer
We have this installer to install the ignite binary thoughts curl (curl https://get.ignite.com/cli! | bash
). We need to add analytics to it to track the number of downloads and which version.
we should use the same proxy we are using to share the analytics from CLI, for we don't expose the token into the script. Because if we do curl https://get.ignite.com/cli\!
without the bash
this downloads all script content
When the script is called, we should make an HTTP request to Google Analytics, passing the version of the Ignite into the request, like the CLI is doing: https://github.com/ignite/cli/blob/9a233e66befb69c1c376d4e3bf662c2ad2e92728/ignite/pkg/gacli/gacli.go#L80-L113
The analytics should be sent at the end of the script and not fail in case the request fails.
Do note that installation on snap or homebrew won't be counted. Those are public and can be found here:
- https://formulae.brew.sh/formula/ignite#default (end of page)
- monthly email from snapcraft
Should we really keep promoting the manual install when we have package managers?
Can we track these installations @julienrbrt ?
Can we track these installations @julienrbrt ?
Those are both tracked yes. I can add you to the monthly emails for snaps if you want.
We can get the brew analytics from the API. Can we easily collect this data to add to the analytics?
https://formulae.brew.sh/api/formula/ignite.json
{
"analytics": {
"install": {
"30d": {
"ignite": 76
},
"90d": {
"ignite": 275
},
"365d": {
"ignite": 275
}
},
"install_on_request": {
"30d": {
"ignite": 76
},
"90d": {
"ignite": 275
},
"365d": {
"ignite": 275
}
},
"build_error": {
"30d": {
"ignite": 0
}
}
}
}