Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Copy events/parameters in event manager between project environments

Discussion in 'Unity Analytics' started by DevelopingSlowlyButProudly, Jan 27, 2022.

  1. DevelopingSlowlyButProudly

    DevelopingSlowlyButProudly

    Joined:
    Dec 10, 2021
    Posts:
    17
    Hi,

    like in the title. Is there a possibility to copy events and parameters between the project environments or do I need to create every single one multiple times whenever I create new environment?
     
  2. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    83
    First, superb choice of username :)
    Secondly, at the moment parameters are shared across environments (they have to be for infrastructure reasons), but events aren't.

    We are hoping to get the ability to copy event schemas from one environment to another though.
    Unfortunately for the time being, copying events is a bit painstaking.
     
    JeffDUnity3D likes this.
  3. ManuelRauber

    ManuelRauber

    Joined:
    Apr 3, 2015
    Posts:
    122
    Hey there!

    That would be an awesome feature. I'm currently transitioning my game from legacy to new analytics. I have around 18 custom events with different parameters.

    Excuse the language, but it's pain in the ass to synchronize the events with the parameters. :)

    Within each event there should be a simple toggle button for each environment to enable/disable it there.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Keep in mind that a single click of a simple toggle button could bring down a production environment. We are working on a proper flow for this feature, stay tuned!
     
    ManuelRauber likes this.
  5. ManuelRauber

    ManuelRauber

    Joined:
    Apr 3, 2015
    Posts:
    122
    Thanks for the reply Jeff!

    Sound's good, that you're working on a proper workflow for it. :)

    One more question regarding "single click of a simple toggle could bring down a production environment". As far as I understood, if an event has not been added yet to the event manager, it shows up in Event Browser -> Invalid events.

    In which case could it be that turning off or sending a wrong analytics event would bring down the production environment?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Correct, you would not want invalid events to suddenly show in the production environment that were working previously.
     
  7. unitynoob24

    unitynoob24

    Joined:
    Dec 27, 2014
    Posts:
    398
    Sorry to necro, been having a ton of issues around the dashboard and custom events. They sometimes or never appear when playing my game from device - but always works from Editor - at least they did when I was in the production environment.

    Today I made a new environment - it says events and such are available across environments. They are not, none of my events or parameters are listed out when I hop to the new environment. Nothing is pinging my new environment either from game. The supporting documentation for this seems to not exist? Maybe I'm not switching environments correctly from my game? Should I be creating the events/params per environment?

    I'm running 5.0.0 so it should be the latest and greatest.

    Code (csharp):
    1.  
    2. private async void Initialize(){
    3.  
    4.             if (!AppGlobal.Instance.APP_DATA.ANALYTICS_INFO.USE_ANALYTICS)
    5.                 return;
    6.  
    7.             environmentDict.Add(Environment.PRODUCTION, "production");
    8.             environmentDict.Add(Environment.TEST_ENVIRONMENT, "test-environment");
    9.  
    10.             var options = new InitializationOptions().
    11.                 SetEnvironmentName(environmentDict[AppGlobal.Instance.APP_DATA.ANALYTICS_INFO.environment]);
    12.  
    13.             await UnityServices.InitializeAsync(options);
    14.  
    15.             if (PlayerProgress.Instance.data.PlayerData.playerDataSecure.hasConsented){
    16.                 AnalyticsService.Instance.StartDataCollection();
    17.                 wasRunning = true;
    18.             }
    19.  
    20.             PopulateRetroEventDict();
    21.          
    22.         }
    23.  
    24.  
    This is how I'm kicking things off - currently passing in test-environment which is the name of the one I just created in the dashboard. @unity_Ctri
     
  8. clarec_unity

    clarec_unity

    Unity Technologies

    Joined:
    Nov 17, 2020
    Posts:
    47
    Hello,

    We're excited to provide you with a brief update on this thread. We've recently shipped a new feature to the Analytics dashboard to meet your needs of copying events between environments. Now you can select your events, choose your target environment and copy them over in bulk. Go to the Event Manager to check it out.

    Thanks,
    Clare
     
  9. james-lockrey

    james-lockrey

    Joined:
    Jul 27, 2016
    Posts:
    1
    This new feature is incredibly useful (our analytics instance has close to 100 custom events - copying them between 4 environments manually would be incredibly painful).

    Is there a similar feature (existing or planned) for Data Exporer reports or Custom Dashboards, so that they can be copied between environments? I couldn't see a forum thread on this topic in particular. Currently, these have to be manually created in each environment.