Giter Site home page Giter Site logo

analytics-ios-integration-amplitude's People

Contributors

alanjcharles avatar brennan avatar briemcnally avatar bsneed avatar ccnixon avatar cerupcat avatar christianyoopies avatar daltonclaybrook avatar djih avatar f2prateek avatar ladanazita avatar louoso avatar mcostasilva avatar migs647 avatar rokgregoric avatar taruntyagi946 avatar teresanesteby avatar tonyxiao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

analytics-ios-integration-amplitude's Issues

Segment-Amplitude build fails

i tried adding this Segment-Amplitude as a dependency to my podfile, similarly to the Segment-Mixpanel and Segment-Branch integrations that we also use. However, it fails building, Segment-Amplitude, since it can't find a the Amplitude.h header. Is this a known issue?

FWIW, Adding Amplitude-iOS seperately from segment's wrapper pod works, but we don't get the segment benefits that way obviously.

Also, I was looking at the example project for any tips, but it doesn't seem to actually implement the Amplitude SDK, and is instead an empty integration.

My build details:
Swift 2.2 project with Xcode 7.3
platform: ios 9.0 only
use_frameworks! is enabled

GZip Extension Conflict

There used to be a conflict what the recently introduced Gzip extension in analytics-ios. That was just recently fixed. Could this library be updated to have as a dependency a version of analytics-iso that has the namespaces GZIP extension?

Thanks!

Amplitude not merging users when SEGAnalytics.identify is called

I recently adding analytics-ios-integration-amplitude in order to get session logging but it appears to have introduced this issue of double counting users.

When my app is installed for the first time, Analytics just uses an anonymous id and logs the AppInstalled and AppOpened, etc. However, once I call SEGAnalytics.identify, instead of just updating the user_id of the current amplitude user, it makes a completely new one. This is breaking all my new user retention and user count metrics.

It appears that the device_id that Amplitude is different after the identify call, which is maybe why this issue is happening?

Old traits are set on new user

Users that logout and create another account are associated to the original user.

I'm currently performing the following:

  • Initialize Segment
  • Identify when a user logs in and set a trait for email.
  • Reset when the user logs out
  • Identify when new user logs in (or creates account) and set trait for email.

The second user is associated with the first in amplitude and the email trait is not set.

Can we make this a Swift Package?

I'm trying to move my project away from Cocoapods, and almost all of my libraries have corresponding Swift Packages.

It would be great if this were available as a Swift Package so I could remove Cocoapods from my machine, and stop using it altogether.

Main thread API violations

Hi,

We are currently experiencing main thread API asserts for this integration that prevent us from running tests on our CI. It also throws these asserts while developing.

The issue begins in SEGAmplitudeIntegration that calls [[Amplitude instance] initializeApiKey:apiKey];

This call should be called on a main queue OR prompt Amplitude to update their SDK to do this. I am linking Amplitude for this one.

It all boils down to how Amplitude uses UIApplication:

        UIApplication *app = [self getSharedApplication];
        if (app != nil) {
            UIApplicationState state = app.applicationState;
            if (state != UIApplicationStateBackground) {
                // If this is called while the app is running in the background, for example
                // via a push notification, don't call enterForeground
                [self enterForeground];
            }
        }

So either Segment fixes this or Amplitude but it would be nice to see this resolved. Happy to submit a patch PR

screen shot 2017-10-11 at 4 53 55 pm

User properties don't override with last version (2.0.0)

Hi,

After few emails and tests with people from both Amplitude and Segment, we found out a strange behaviour in the last version of this SDK.

Basically, every time you try to override a user property that is already existing on the user by providing a new value. The old value is kept, and you cannot update it.

In order to reproduce the bug, just set up a new XCode project with the following pods:
pod 'Analytics', '~> 3.0'
pod 'Segment-Amplitude'

Then do an identify call with a trait (key: value) followed by another identify call with the same key but another value (key: value2).
screen shot 2018-04-09 at 16 54 21

Here is what the Segment's debugger shows, which is good so far:
screen shot 2018-04-09 at 16 52 25
then:
screen shot 2018-04-09 at 16 52 35

Normally, you should see the value2 appears under the key user property under Amplitude's UI for the corresponding user.
By using the version 2.0.0 of this SDK, it doesn't work:
screen shot 2018-04-09 at 16 53 02

However, by downgrading to version 1.5.0 it worked, that's the fix I'm using right now.
pod 'Analytics', '~> 3.0'
pod 'Segment-Amplitude', '~> 1.5.0'

Attached, some screenshots to showcase the problem.
Thanks!

Version 1.4.3 still uses Amplitude-iOS 3.14

I updated the Segment-Amplitude pod to 1.4.3 in order to have the version 4.0 of the Amplitude-iOS pod.
In your Podspec the version of Amplitude-iOS seems to be set correctly, but when executing pod install or pod update the version which is installed is still the old 3.14...
In the Cocoapods specs repo, we see the version of Amplitude-iOS is still 3.14

Unable to integrate: "target has transitive dependencies that include statically linked binaries: (Analytics)"

At some point, things were working, so I'm not sure what changed recently. When adding this pod, I'm receiving the final error from cocoapods:

[!] The 'Pods-MOJO' target has transitive dependencies that include statically linked binaries: (Analytics)

This seems to relate to using use_frameworks! in cocoapods. Removing that causes another error the #import <Segment/SEGAnalytics.h> can't be found.

New Xcode build issue

I recently upgraded to the latest segment-amplitude pod. Now im getting a 'Analytics/Analytics.h' file not founderror in the SegAmplitudeIntegration file, and Framework not found error in Xcode. No issue for the last year, and no issue with segment-mixpanel pod.

Duplicate events?

It looks like I'm getting duplicate events through both the included Ampltiude integration (lib: iOS) Segment (lib: analytics-ios):

screen shot 2015-12-11 at 10 24 52 am

Any idea what could be going on?

'Set trait once' not working as expected

Hi folks,

I'm trying to create a user property that cannot be modified using the identify API. I've configured this in the Segment console as described in the docs (I did hit Save! ๐Ÿ˜„):
image

I would have expected the integration to fork here

if ([self.traitsToIncrement count] > 0 || [self.traitsToSetOnce count] > 0) {
and work as described. However, in Amplitude's console I'm seeing the value of that user property change after multiple calls. ๐Ÿ˜ž

I'm guessing that the integration settings aren't getting updated appropriately. Any tips on troubleshooting this, or is there a way we can force the set-once behavior via the factory's configuration?

compilation fail

Hello,
In my current iOS project, I've added the cocoapod Segment-Amplitude, last available version 3.2.0-alpha, with the cocoapod Analytics 3.0.6.

The compilation fails in AMPDatabaseHelper.m, with "use of undeclared identifier SQLITE_OPEN_READWRITE".

I'm still looking for way to fix that, but if anyone has an idea, I'm interested !
Thanks
l.

Breaking Changes in Amplitude 7.0.0 Dependency

Amplitude-iOS 7.0.0 Release Notes

Summary: Amplitude removed a few things and now Segment-Amplitude is broken.

Background: Users reported that IDFA MACRO still do not prevent app rejections. So we make both idfa and location tracking to be fully customer driven.

Add adSupportBlock to let idfa tracking to be customer driven.
Add locationInfoBlock to let location tracking to be customer driven.
Remove enableLocationListening, disableLocationListening and updateLocation APIs.

Carthage compile error

Hi,

I'm trying to add this Segment integration via Carthage but it fails with Task failed with exit code 65.

Not sure if related but, I had to add it to the Cartfile using git "https://github.com/segment-integrations/analytics-ios-integration-amplitude.git" as I couldn't find the name to install it via Carthage.

The log error file contains this:

** ARCHIVE FAILED **

The following build commands failed:
CompileC /Users/juangarcia/Library/Caches/org.carthage.CarthageKit/DerivedData/11.4.1_11E503a/analytics-ios-integration-amplitude/3.0.2/Build/Intermediates.noindex/ArchiveIntermediates/Segment-Amplitude/IntermediateBuildFilesPath/Segment-Amplitude.build/Release-iphoneos/Segment-Amplitude.build/Objects-normal/arm64/SEGAmplitudeIntegrationFactory.o /Users/juangarcia/Development/Name/Carthage/Checkouts/analytics-ios-integration-amplitude/Pod/Classes/SEGAmplitudeIntegrationFactory.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

CompileC /Users/juangarcia/Library/Caches/org.carthage.CarthageKit/DerivedData/11.4.1_11E503a/analytics-ios-integration-amplitude/3.0.2/Build/Intermediates.noindex/ArchiveIntermediates/Segment-Amplitude/IntermediateBuildFilesPath/Segment-Amplitude.build/Release-iphoneos/Segment-Amplitude.build/Objects-normal/armv7/SEGAmplitudeIntegration.o /Users/juangarcia/Development/Name/Carthage/Checkouts/analytics-ios-integration-amplitude/Pod/Classes/SEGAmplitudeIntegration.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

CompileC /Users/juangarcia/Library/Caches/org.carthage.CarthageKit/DerivedData/11.4.1_11E503a/analytics-ios-integration-amplitude/3.0.2/Build/Intermediates.noindex/ArchiveIntermediates/Segment-Amplitude/IntermediateBuildFilesPath/Segment-Amplitude.build/Release-iphoneos/Segment-Amplitude.build/Objects-normal/arm64/SEGAmplitudeIntegration.o /Users/juangarcia/Development/Name/Carthage/Checkouts/analytics-ios-integration-amplitude/Pod/Classes/SEGAmplitudeIntegration.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

CompileC /Users/juangarcia/Library/Caches/org.carthage.CarthageKit/DerivedData/11.4.1_11E503a/analytics-ios-integration-amplitude/3.0.2/Build/Intermediates.noindex/ArchiveIntermediates/Segment-Amplitude/IntermediateBuildFilesPath/Segment-Amplitude.build/Release-iphoneos/Segment-Amplitude.build/Objects-normal/armv7/SEGAmplitudeIntegrationFactory.o /Users/juangarcia/Development/Name/Carthage/Checkouts/analytics-ios-integration-amplitude/Pod/Classes/SEGAmplitudeIntegrationFactory.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(4 failures)


Thanks!

'FirebaseAnalytics/FirebaseAnalytics.h' file not found

Even in a new project will fail while compiling.
My current Podfile for a test project is

target 'SegmentIntegrationTest' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!

  pod 'Segment-Firebase', '~> 2.0'
  # Pods for SegmentIntegrationTest

end

The error shows up in Firebase.h with message 'FirebaseAnalytics/FirebaseAnalytics.h' file not found

Unable to upgrade to latest Amplitude: Amplitude pin too restrictive

Hi there! I'm trying to upgrade to the latest Amplitude and Segment-Amplitude, but the pin for Amplitude is set to '~> 7.0.1'. This only allows for 7.0.1 or greater, up to not but including 7.1.0. I think you want something like '>= 7.0.1', '< 8.0' (guessing). With the current setup though, it's not possible to update Segment-Amplitude and Amplitude to the latest versions, to date using CocoaPods.

Plans to update the Podspec repo with the latest version?

Hi @f2prateek

We're looking to pick up the latest changes and close #7 , but it looks like the spec repo thinks the latest version is 3.2.0-alpha.

when using pod 'Segment-Amplitude', a pod outdated command reports the following

Segment-Amplitude 1.2.0 -> 1.2.0 (latest version 3.2.0-alpha)

can we expect this to be released soon? we'd obviously rather point to the common spec repo than master in this one.

SPM Support

Many SDKs are moving to Swift Package Manager support in addition to cocoapods.

It would be nice to get this repo via SPM as well.

Traits don't update when using certain settings

When using traitsToIncrement or traitsToSetOnce, the traits that aren't incremental or set once don't override the current user properties in amplitude.

I've testing by calling [self.amplitude setUserProperties:payload.traits]; directly and the traits correctly update/override. However, when a incremental or setOnce trait is used (via Segment dashboard settings), this call isn't used an instead it calls:

- (void)incrementOrSetTraits:(NSDictionary *)traits
{
    for (NSString *trait in traits) {
        id value = [traits valueForKey:trait];
        if ([self.traitsToIncrement member:trait]) {
            [self.amplitude identify:[self.identify add:trait value:value]];
            SEGLog(@"[Amplitude add:%@ value:%@]", trait, value);
        } else if ([self.traitsToSetOnce member:trait]) {
            [self.amplitude identify:[self.identify setOnce:trait value:value]];
        } else {
            [self.amplitude identify:[self.identify set:trait value:value]]; // don't override traits and is essentially a set once
            SEGLog(@"[Amplitude set:%@ value:%@]", trait, value);
        }
    }
}

[self incrementOrSetTraits:payload.traits]; is called and the function will fail to override traits that already exist rather than calling [self.amplitude setUserProperties:payload.traits]; which appears to work as expected.

The error amplitude will log:

        AMPLITUDE_LOG(@"Already used property '%@' in previous operation, ignoring for operation '%@'", property, operation);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.