diff --git a/Mixpanel/Mixpanel.m b/Mixpanel/Mixpanel.m index 14a375257..39d35ede5 100755 --- a/Mixpanel/Mixpanel.m +++ b/Mixpanel/Mixpanel.m @@ -264,7 +264,9 @@ - (void)track:(NSString *)event properties:(NSDictionary *)properties [self.timedEvents removeObjectForKey:event]; p[@"$duration"] = @([[NSString stringWithFormat:@"%.3f", epochInterval - [eventStartTime doubleValue]] floatValue]); } - p[@"mp_name_tag"] = self.nameTag; + if (self.nameTag) { + p[@"mp_name_tag"] = self.nameTag; + } p[@"distinct_id"] = self.distinctId; [p addEntriesFromDictionary:self.superProperties]; if (properties) {