Avoid script inlining at custom error pages


I try to track how often I got 500 errors on my site in Google Analytics. I created custom error page, and inserted Google Analytics code in it.
When I make a check in preview mode I see that GA script is fetched from google and inlined into my error page. Is there any way to avoid such a behavior and leave GA Analytics operational?
Here is preview url: http://cloudflarepreview.com/preview-cpage?act=preview&target=cf-error%3A500s&url=http%3A%2F%2Fstage.pravda.casino%2Fcf-error-500.html