Disable portions of content while developing

No, but the common way of doing this is to check a user defined environment variable:

{{ if eq (getenv "env") "prod" }}
// include google analytics
{{ end }}

You need to then do:

HUGO_ENV=prod hugo 

When you publish your site.