With the comment above, I think it best to just write it or not write it with something like:
```
{% if GOOGLE_ANALYTICS_ID %}
<script>
....
```
A half-butchered inline script is just clutter.