Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Change cloudProjectId at runtime or projects with multiple clouldProjectIds

Discussion in 'Unity Analytics' started by mpinol, Nov 4, 2015.

  1. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hello everyone,

    Every week or so we go over the highest voted suggestions on the feedback page, https://feedback.unity3d.com/forums...✓&status=0&category=analytics&view=most_voted and have noticed that the topic of multiple project ids for a single project had gained a lot of votes over the past few weeks.

    We are looking to gain a greater understanding of how developers are looking to use this feature so if this is a feature that interests you could you please give us a quick summary of why and how you are planning on using it? What are your use cases where having the ability to change it at runtime is important?


    Thank you for your feedback!
     
  2. omermujahid

    omermujahid

    Joined:
    Sep 25, 2012
    Posts:
    31
    In our case, we have two different versions of the application on Android, one for the Google Play store, and one for the Amazon store. We have build scripts for each store build, so we'd like to change the UA key on runtime. Right now we do it manually, but we've had issues where the developer forgot, and that polluted our data
     
  3. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Thanks @omermujahid !

    This is kind of what we have been thinking. What kind of features would you like to see built to make changing this easier or more usable? What changes could be made to the dashboard that would eliminate or enhance the use multiple project ids?
     
  4. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    You could add an option in the player setting for the id for each platform? Could also have it change if its a development build
     
  5. p0w1nd

    p0w1nd

    Joined:
    Oct 28, 2015
    Posts:
    140
    I have a similar though like @omermujahid

    During development there are a lot of events sent to UA (custom events, gameplay events, purchase record events,...) but obviously they can't be counted to the real data of real users. So right now my idea is that I create 2 different project on UA: Game (dev) and Game (live), and switch them accordingly; But there's a high risk like @omermujahid mention above.

    So I also voted for "CHANGE CLOUD PROJECT ID AT RUNTIME" issue.

    Btw, below is a related question I'd like to hear advices from fellow game developers here:

    I personally prefer one dashboard for all data of a multi-platform game. I see that UA already has a filter for platform in Data Explorer ("Android Users", "iOS Users"). But @omermujahid's point about different project ID for different markets sounds interesting, because for Android you have not only Google Play but Amazon and many other markets. Thus "Android Users", "iOS Users" are not enough. If I want to keep one dashboard I guess I only have one solution: add additional information to the custom event (e.g store name)? Any other idea?
     
    mpinol likes this.
  6. rihdus

    rihdus

    Joined:
    Jul 13, 2012
    Posts:
    10
    Has anything been done on this? We have 4 different environments and use an automated build system to build for each. Is there an API where we can change the project ID before each build?
     
  7. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @rihdus,

    Thanks for following up! We are still working on this feature, but unfortunately I don't have any real information on when it will be finished and released. We will make an announcement once it is ready for release!
     
  8. JRufer

    JRufer

    Joined:
    Mar 13, 2015
    Posts:
    1
    Hello,

    I actually have 4 different games all built out of the same Unity project. They all share a huge core library so our automated build swaps out the project settings folders for each app before it builds them. Inside the .asset files I see the different project IDs used for analytics on each of the apps but it appears that we are getting cross app contamination. One of the apps is unreleased but it's MAU is almost identical to our public released project. Is there any reason why two apps, owned by the same Organization with different project IDs would share metrics data?
    Thanks!
     
  9. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    @JRufer
    It seems unlikely, and we've had no similar reports that I'm aware of. Given the way you describe your build chain, it seems far more likely that your unusual setup is at the root of this. It would certainly be interesting (and unexpected) if you've somehow managed to double-log events between two apps. That you could do that might constitute a bug on our part, so it might be worth opening a support ticket. The support engineer can investigate the specifics and possibly help you out further.
     
  10. Tuni

    Tuni

    Joined:
    May 24, 2013
    Posts:
    74
    Any news on that? At least you can let us modify the cloudProjectId field in the PlayerSettings by an editor script. It's frustrating to see no progress within a year.
     
  11. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Tuni,

    Are you looking to modify the cloudProjectId field in order to separate your test data from production data? If so we have rolled out features recently for creating segments based on app version or bundle id, which could help achieve this goal. Additionally we're working on a feature for clearing a project's data, if you're not interested in the historical test data anymore, but I don't have any information on a release date for that.

    If that's not your use case, can you please explain more about what is, so we can look into it? Thanks!
     
  12. Tuni

    Tuni

    Joined:
    May 24, 2013
    Posts:
    74
    Thank you for your fast response @erika_d . Yes, you are exactly describing our case.

    The feature you are describing sounds nice, but it would be much cleaner to let us change the PlayerSettings.cloudProjectId field by an editor script. So we don't have to explain people why they have to ignore specific data in the unity services backend.

    This is not only an analytics problem. Game Peformance reporting for example will be filled with a lot of errors created during the development of updates or additional content. So you have to look at all of them to see if your players have any problems with the game. This isn't the workflow we are looking for.
     
  13. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @Tuni,

    I can understand how changing project Ids could be cleaner. In theory this is something that sounds simple, but in practice, because it's a universal ID across all Unity Services, implementing this kind of feature is much more complicated. It is something that has been discussed, and I will pass your request and use case on to the team that handles coordination across services!
     
  14. rkstormer

    rkstormer

    Joined:
    Nov 26, 2012
    Posts:
    27
    I just came across this thread two years later and I still BADLY want this feature. I think the use case of building different versions of a game or at least doing both a free and paid version is probably fairly common... Is there a feature request that I can still upvote for this?
     
  15. Grumpy-Dot

    Grumpy-Dot

    Joined:
    Feb 29, 2016
    Posts:
    93
  16. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    167
  17. bacabrother

    bacabrother

    Joined:
    Aug 11, 2015
    Posts:
    3