segmentio/analytics-swift

Add optional track method that returns success/fail result

colejoplin opened this issue · 2 comments

When sending a track, we don't know if an error occurs, it goes to reportInternalError(). Adding an optional method with a result would be welcome.

Why? We are using track to send user feedback. We like the freedom of Segment to push to any destination. Even if we persist the data in the app, we are still guessing if the track event succeeded.

bsneed commented

Events are buffered, and track is an event. If you want to see if the events make it to Segment, call flush() with a completion block and you'll know if it was successful or not. The use-case you describe is pretty non-standard and not really what Segment is for. There's other services that specialize in what it sounds like you're doing.

@bsneed I appreciate the response. I'll look at flush(). Thanks.