fix: report GA event with value to indicate failure

This commit is contained in:
debugtalk
2022-01-08 12:35:54 +08:00
parent d1b80bb164
commit d3c97800f0
3 changed files with 13 additions and 7 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ func TestSendEvents(t *testing.T) {
event := EventTracking{
Category: "unittest",
Action: "SendEvents",
Value: "123",
Value: 123,
}
err := gaClient.SendEvent(event)
if err != nil {
@@ -21,7 +21,7 @@ func TestStructToUrlValues(t *testing.T) {
Category: "unittest",
Action: "convert",
Label: "v0.3.0",
Value: "123",
Value: 123,
}
val := structToUrlValues(event)
if val.Encode() != "ea=convert&ec=unittest&el=v0.3.0&ev=123" {