analytics-swift icon indicating copy to clipboard operation
analytics-swift copied to clipboard

Library does not automatically collect IAP Order Completed events, despite what docs say

Open jb-chief opened this issue 1 year ago • 2 comments

Describe the bug Native mobile docs (https://segment.com/docs/connections/spec/mobile/) state:

Additionally, though they’re not formally part of the Native Mobile Spec, Segment also collects Order Completed from our ecommerce spec automatically upon in-app purchases on iOS and can collect screen views automatically in iOS and Android.

But I don't think this is true when using the analytics-swift library, is it?

I think it's maybe worth:

  1. updating the docs accordingly
  2. providing an example of plugin for how to automatically collect IAP events using analytics-swift

jb-chief avatar May 03 '24 17:05 jb-chief

That's a great callout, thanks @jb-delightai. In the meantime, the one from analytics-ios might be helpful. A swift implementation wouldn't be too far off from what's here: https://github.com/segmentio/analytics-ios/blob/master/Segment/Internal/SEGStoreKitTracker.m

bsneed avatar May 03 '24 18:05 bsneed

Awesome, thank you! You wouldn't happen to have any example code for StoreKit v2 transactions, would you? 😃

jb-chief avatar May 03 '24 22:05 jb-chief

I don't unfortunately; sorry I missed your reply previously.

bsneed avatar May 14 '24 20:05 bsneed

I'm gonna close this and we're gonna update the doc accordingly. I have an internal ticket filed to get that done.

bsneed avatar May 14 '24 20:05 bsneed