diff --git a/Sources/Segment/Events.swift b/Sources/Segment/Events.swift index fd2220e9..09ddcdaf 100644 --- a/Sources/Segment/Events.swift +++ b/Sources/Segment/Events.swift @@ -35,10 +35,12 @@ extension Analytics { /// Associate a user with their unique ID and record traits about them. /// - Parameters: - /// - userId: A database ID (or email address) for this user. If you don't have a userId - /// but want to record traits, you should pass nil. For more information on how we - /// generate the UUID and Apple's policies on IDs, see https://segment.io/libraries/ios#ids - /// - traits: A dictionary of traits you know about the user. Things like: email, name, plan, etc. + /// - userId: A database ID for this user. If you don't have a userId + /// but want to record traits, just pass traits into the event and they will be associated + /// with the anonymousId of that user. For more information on how we + /// generate the UUID and Apple's policies on IDs, see + /// https://segment.io/libraries/ios#ids + /// - traits: A dictionary of traits you know about the user. Things like: email, name, plan, etc. public func identify(userId: String, traits: T?) { do { if let traits = traits { @@ -72,7 +74,7 @@ extension Analytics { /// Associate a user with their unique ID and record traits about them. /// - Parameters: - /// - userId: A database ID (or email address) for this user. + /// - userId: A database ID for this user. /// For more information on how we generate the UUID and Apple's policies on IDs, see /// https://segment.io/libraries/ios#ids /// In the case when user logs out, make sure to call ``reset()`` to clear user's identity info. @@ -132,9 +134,11 @@ extension Analytics { extension Analytics { /// Associate a user with their unique ID and record traits about them. /// - Parameters: - /// - userId: A database ID (or email address) for this user. If you don't have a userId - /// but want to record traits, you should pass nil. For more information on how we - /// generate the UUID and Apple's policies on IDs, see https://segment.io/libraries/ios#ids + /// - userId: A database ID for this user. If you don't have a userId + /// but want to record traits, just pass traits into the event and they will be associated + /// with the anonymousId of that user. For more information on how we + /// generate the UUID and Apple's policies on IDs, see + /// https://segment.io/libraries/ios#ids /// - properties: A dictionary of traits you know about the user. Things like: email, name, plan, etc. public func track(name: String, properties: [String: Any]? = nil) { var props: JSON? = nil @@ -151,9 +155,11 @@ extension Analytics { /// Associate a user with their unique ID and record traits about them. /// - Parameters: - /// - userId: A database ID (or email address) for this user. - /// For more information on how we generate the UUID and Apple's policies on IDs, see - /// https://segment.io/libraries/ios#ids + /// - userId: A database ID for this user. If you don't have a userId + /// but want to record traits, just pass traits into the event and they will be associated + /// with the anonymousId of that user. For more information on how we + /// generate the UUID and Apple's policies on IDs, see + /// https://segment.io/libraries/ios#ids /// - traits: A dictionary of traits you know about the user. Things like: email, name, plan, etc. /// In the case when user logs out, make sure to call ``reset()`` to clear user's identity info. public func identify(userId: String, traits: [String: Any]? = nil) {