Explorar o código

add mp_name_tag for mixpanel streams

raylu %!s(int64=14) %!d(string=hai) anos
pai
achega
54e178dd54
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      mixpanel.go

+ 3 - 0
mixpanel.go

@@ -26,6 +26,9 @@ func track(event, ip, id, song, user string) {
 	}
 	if user != "" {
 		properties["user"] = user
+		if user != "anonymous" {
+			properties["mp_name_tag"] = user
+		}
 	}
 	data["properties"] = properties