GA/UserVoice opt-in

This commit is contained in:
Andrea Spacca
2018-06-26 18:39:56 +02:00
parent e284bff214
commit 7c25f986aa
5 changed files with 20880 additions and 407 deletions

View File

@ -72,6 +72,16 @@ var globalFlags = []cli.Flag{
Usage: "path to static web files",
Value: "",
},
cli.StringFlag{
Name: "ga-key",
Usage: "key for google analytics (front end)",
Value: "",
},
cli.StringFlag{
Name: "uservoice-key",
Usage: "key for user voice (front end)",
Value: "",
},
cli.StringFlag{
Name: "provider",
Usage: "s3|gdrive|local",
@ -206,6 +216,14 @@ func New() *Cmd {
options = append(options, server.WebPath(v))
}
if v := c.String("ga-key"); v != "" {
options = append(options, server.GoogleAnalytics(v))
}
if v := c.String("uservoice-key"); v != "" {
options = append(options, server.UserVoice(v))
}
if v := c.String("temp-path"); v != "" {
options = append(options, server.TempPath(v))
}