Setting environment for project

  • 23 December 2022
  • 8 replies
  • 422 views

Badge

Hello!🙂 I still have some question about setting environments.

So, I have 2 projects, one - the main project, second - development version for first project (as advised to me here). I created both projects separate from each other. I use Ampli CLI and I want to make it possible to use both projects in the same ampli.json configuration but for different environments (for staging version of my app - events goes to MyDevelopmentProject, and for production - events go to MyProductionProject). For this I think I need to combine both of these projects in different environments. What I mean: Production - MyProductionProject,  Development: MyDevelopmentProject. But when I try to set MyDevelopmentProject as a development environment for my MyProductionProject I see this message:

After you associate the following projects with this tracking plan, there will no longer be any projects associated with their former tracking plans. To keep things clean, we’ll delete their former tracking plans for you.

What does it mean ? I lose all changes (events, user property etc) inside MyDevelopmentProject ? Or something else ?  I have read this article but I am still confused. 


8 replies

Userlevel 6
Badge +8

Hi @Gaka ,

 

Thanks for writing in! I believe this would just mean that no projects would be linked to your previous tracking plan and so, it will be removed. The new tracking plan for that project will take it’s place. Are there certain aspects you want to keep? In which case, can you let me know your Org ID so I can take a look at your data and see? Thanks!

 

Kind Regards,
Denis

Badge

Hello @Denis Holmes ! Thanks for your answering! Yes I want to keep all data (events, user property etc) from my main project after linking with second project. Is it possible? You can see it with this id - 118147

Userlevel 6
Badge +8

HI @Gaka ,

 

Thanks so much for the Org ID! Would you be able to PM me a link to a screen recording of the issue? I cannot seem to reproduce the error so would like to see it in again. Thank you!

Badge

Hi @Denis Holmes ! It’s not the issue.🙂 I just try to figure out what happens if I set one project as a development environment for another. Will their tracking plan be deleted for both of projects?


P.S. I notice there is an update in the Amplitude service - when you create a new project, two environments are created at once automatically. Our project was created before this update and was created with a production environment only. I took the advice from this question and created a separate project and use it for tests. Now I'm trying to find a solution on how to combine two projects. it is necessary without changing the config (I use ampli cli and have ampli.json config with project properties) , depending on the application environment - events go to different projects.

Userlevel 6
Badge +8

Hi @Gaka , let me look into this and get clarity, thank you. 

Userlevel 6
Badge +8

HI @Gaka ,

 

As per one of our Engineer’s, All of the event and property data will be kept for both MyDevelopmentProject and MyProductionProject. The “After you associate the following projects…” message should have a list of affected Data projects underneath which in the case described should only include “MyDevelopmentProject”. What this means is that we’ll delete the Data project for MyDevelopmentProject (this is just the tracking plan, activity and comments and stuff rather than actual ingested event and property data), but I imagine this is pretty much a duplicate of MyProductionProject anyway in this case.

This is the intended workflow for combining two Analytics projects with the same/similar tracking plans into one Data project so I’ll feedback that there’s been some confusion.

 

Thank you!

Badge

Hello! @Denis Holmes thank you so much for your answer, it’s exactly what I need!
But there is still a little bit confused moment.
I did as discussed above - MyDevelopmentProject set as development env for MyProductionProject and everything work is fine. Events from the application go to the right environments for development and production.  
But when I go to the development project, a message appears as in the screenshot below. This looks like a repeated warning about what you said above - about deleting Data project. If I click “Delete project” - can I still use this MyDevelopmentProject to track events from the app development environment (as it works now) ? What is the best and safest way to handle this message?

 

Userlevel 6
Badge +8

Hi @Gaka ,

 

The best way would be to delete this project which will delete the tracking plan, activity and comments and stuff rather than actual ingested event and property data). You should then be able to proceed!

Reply