I think I'd rather have these templates be unaware of what environment they run in - that way there is one less thing to take into account.

If the code is output without an ID (eg. in development), nothing will happen.