This small javascript snippet (see below / look at the source) will always identify Googlebot, and has a less than 1 in 10,000 chance of a false positive. If you don't believe me, upload it to your server and try in Google Search Console with the 'Fetch & Render' tool.

Can you work out why??

Blog post explaining this is here: Googlebot's Javascript....