change: update ga events

This commit is contained in:
debugtalk
2022-03-22 11:54:49 +08:00
parent b367a68d9b
commit bbca38f545
3 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

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