cli icon indicating copy to clipboard operation
cli copied to clipboard

INIT: Analytics to CLI Installer

Open Pantani opened this issue 10 months ago • 6 comments

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.

Pantani avatar Apr 17 '24 16:04 Pantani

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

Pantani avatar Apr 17 '24 17:04 Pantani

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.

Pantani avatar Apr 17 '24 17:04 Pantani

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?

julienrbrt avatar Apr 17 '24 19:04 julienrbrt

Can we track these installations @julienrbrt ?

toschdev avatar Apr 17 '24 23:04 toschdev

Can we track these installations @julienrbrt ?

Those are both tracked yes. I can add you to the monthly emails for snaps if you want.

julienrbrt avatar Apr 18 '24 06:04 julienrbrt

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
      }
    }
  }
}

Pantani avatar Apr 18 '24 09:04 Pantani