Open
Description
Hey Mixpanel team,
I have a question - is it possible to track multiple "time" events withe the same name?
Let's imagine that I am working on a "cloud storage" app and I want to track how long it takes for a user to upload a single file to a server and at the same time app allows uploading multiple files in parallel.
my tracking code would look smth like:
func startUpload(filePaths: [String]) {
filePaths.forEach { upload($0) }
}
func upload(filePath: String) async {
Task {
do {
Mixpanel.mainInstance().time("FileUpload")
try await httpClient.uploadFile(filePath)
Mixpanel.mainInstance().track("FileUpload", properties: ["result": "ok", "path": filePath])
} catch {
Mixpanel.mainInstance().track("FileUpload", properties: ["result": "fail", "path": filePath])
}
}
}
Is this valid code from Mixpanel tracking point of view? Will it correctly track eg. 3 uploads happening in parallel?
If not how this can be achieved using mixpanel?
I can possibly create a unique event name like eg: FileUpload-\(filePath)
but this means that I am not following best practice as shown eg here: https://docs.mixpanel.com/docs/tracking/how-tos/events-and-properties#best-practices
Metadata
Metadata
Assignees
Labels
No labels