How to apply the page-hiding snippet for Google Optimize?
Well, since posting my question, there is now a Google Optimize Hide Page module, which provides a code example of how to do this.

There is also a patch to add this functionality to the Google Tag Manager module.