-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Hello,
I've integrated this repo so that I can have native amplitude tracking via segment. I'm under the impression that by doing this, i've disabled "cloud mode" and the amplitude ios library is setup natively on my ios app and initialized via segment.
i'm doing so with code like this:
val configuration = SEGAnalyticsConfiguration.configurationWithWriteKey(
BuildKonfig.SEGMENT_IOS_API_KEY
)
// These need explicit casts because both libs have their own SEGIntegrationFactoryProtocol defined.
configuration.use(SEGAmplitudeIntegrationFactory() as SEGIntegrationFactoryProtocol)
configuration.trackApplicationLifecycleEvents = true // Enable this to record certain application events automatically!
SEGAnalytics.setupWithConfiguration(configuration)note that the above is kotlin code because i'm using kotlin multiplatform. however, it should be equivalent to the following ios code:
SEGAnalyticsConfiguration *config = [SEGAnalyticsConfiguration configurationWithWriteKey:SEGMENT_WRITE_KEY];
[config use:[SEGAmplitudeIntegrationFactory instance]];
[SEGAnalytics setupWithConfiguration:config];
i'm noticing that all my events coming into amplitude have a sessionId of -1, which seems to indicate the integration is using cloud mode or otherwise not working. i'm doing the same approach on the android side of my codebase (via segment analytics.add(plugin = AmplitudeSession()))
has anyone encountered this before? it seems like integrating it like above should result in an equivalent integration as integrating the amplitude lib directly, but that doesn't seem to be the case.