I just wanted to make sure I would be approaching this problem correctly when it comes time to publish our website next week that has had a few pages added onto it. Any advice is greatly appreciated.
So, as of right now we have an original container (Container 1) in Google Tag Manager, it has a few tags set up and working, great. Last week, I created a new container in GTM (Container 2) and have been using that to test our dev. website. Adding a few tags to the new pages of our website so I am ready to add them to our actual published website once it goes live.
When I created Container 2 I sent the GTM code to the developer and he put it into the header of the dev. website My question is.. when we publish the dev. website are we going to need to remove that code from the header and replace it with Container 1's code that way we are operating on the existing tags and I only have to replicate the few tags I made in Container 2?
Clarification: I want to keep my tags from Container 1 and use this container as the website still needs all these tags, I was just creating tags for additional pages to the website, it has otherwise remained the same.
Now that we've overviewed how things should be done, let's get to your question at hand.
Your questions is, basically, asking whether your developers are going to replace container 1 with container 2 when pushing the lowers to prod. Ask them. But generally, it's better to have three things in place:
Have developers never push the GTM code from dev to prod, maintaining different GTM snippets on dev and prod.
Have a universal container-agnostic tracking logic in your containers, so that even if the developers push the dev container to prod, your tracking is still perfect and all the events are going to the production GA rather than dev GA.
Have a universal, container-agnostic logic that console.warns a GTM message if it detects that the dev container is being used on prod.
There.
In short, the easiest thing for you is to keep container 1 on prod and 2 on dev always, but maintain parity between them and move changes from 2 to 1 every time you're done with your work. That's the expedient option.
The proper thing to do is to remove container 2 completely, create an environment in container 1, have your lower env container 1 code deployed to dev, notify the devs that that container is for dev only and make sure your code there is universal.