Search Unity

Google Analytics - Multiple Instances on iOS?

Discussion in 'Scripting' started by BrodyB, Sep 12, 2015.

  1. BrodyB

    BrodyB

    Joined:
    Dec 17, 2014
    Posts:
    10
    Hey there!

    I'm working on an app where we want to have Google Analytics sending all our analytics information to two different tracking IDs. The best way I've found to achieve this is to have two different instances of the GoogleAnalyticsV3 script on a GameObject and a custom analytics manager script sitting alongside I pass my analytics calls to that will pass them along to each instance.

    For desktop/web player, this works great. When I run the app, we see both analytics accounts light up with activity. However, when I push to iOS, the only tracking ID used is what's set on the last GoogleAnalyticsV3 instance (the lowest instance of it on the GameObject that contains all of them as seen in the Inspector window). So, all I seem to be able to push to on iOS is one tracking ID, period.

    Is this a known behavior and is there a work-around? Or does this not sound right to anyone and I might be doing something wrong? This has really been throwing me for a loop.

    Thanks for any help!
     
  2. danieltranca

    danieltranca

    Joined:
    Jan 9, 2015
    Posts:
    10
    I have the same problem and after some investigation I found that Google is using singleton for iOS(id tracker = [[GAI sharedInstance] defaultTracker];) have you found any workaround this problem?

    Thank you!