From bbca38f5456d11fa0a271fecb887089cc37ea025 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Tue, 22 Mar 2022 11:54:49 +0800 Subject: [PATCH] change: update ga events --- internal/ga/events.go | 2 +- internal/har2case/core.go | 4 ++-- plugin.go | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/ga/events.go b/internal/ga/events.go index 99e91179..005c151d 100644 --- a/internal/ga/events.go +++ b/internal/ga/events.go @@ -40,7 +40,7 @@ type UserTimingTracking struct { HitType string `form:"t"` // Timing hit type Category string `form:"utc"` // Required. user timing category. e.g. jsonLoader Variable string `form:"utv"` // Required. timing variable. e.g. load - Duration string `form:"utt"` // Required. time took duration. Required. + Duration string `form:"utt"` // Required. time took duration. Label string `form:"utl"` // Optional. user timing label. e.g jQuery startTime time.Time duration time.Duration // time took duration diff --git a/internal/har2case/core.go b/internal/har2case/core.go index 3e2df99d..cc9b4678 100644 --- a/internal/har2case/core.go +++ b/internal/har2case/core.go @@ -43,7 +43,7 @@ func (h *har) SetOutputDir(dir string) { func (h *har) GenJSON() (jsonPath string, err error) { event := ga.EventTracking{ - Category: "har2case", + Category: "ConvertTests", Action: "hrp har2case --to-json", } // report start event @@ -62,7 +62,7 @@ func (h *har) GenJSON() (jsonPath string, err error) { func (h *har) GenYAML() (yamlPath string, err error) { event := ga.EventTracking{ - Category: "har2case", + Category: "ConvertTests", Action: "hrp har2case --to-yaml", } // report start event diff --git a/plugin.go b/plugin.go index 32ddf4b3..6a8b58b9 100644 --- a/plugin.go +++ b/plugin.go @@ -48,6 +48,7 @@ func initPlugin(path string, logOn bool) (plugin funplugin.IPlugin, err error) { event := ga.EventTracking{ Category: "InitPlugin", Action: fmt.Sprintf("Init %s plugin", plugin.Type()), + Value: 0, // success } if err != nil { event.Value = 1 // failed