outposts: also send outpost type

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-04 15:08:31 +01:00
parent 8d766efecb
commit dd82d55725
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ func getEnv() string {
return "custom"
}
func analytics(akURL url.URL, on string) {
func analytics(akURL url.URL, on string, t string) {
if _, s := os.LookupEnv("AUTHENTIK_DISABLE_ANALYTICS"); s {
return
}
@ -56,7 +56,7 @@ func analytics(akURL url.URL, on string) {
}{
Domain: "authentik",
Name: "pageview",
URL: fmt.Sprintf("http://localhost/outpost/%s", e),
URL: fmt.Sprintf("http://localhost/outpost/%s/%s", e, t),
Referrer: fmt.Sprintf("%s (%s)", constants.VERSION, constants.BUILD()),
}
b, err := json.Marshal(body)

View file

@ -67,7 +67,7 @@ func NewAPIController(akURL url.URL, token string) *APIController {
}
outpost := outposts.Results[0]
doGlobalSetup(outpost.Config)
go analytics(akURL, outpost.Name)
go analytics(akURL, outpost.Name, string(outpost.Type))
log.WithField("name", outpost.Name).Debug("Fetched outpost configuration")