Avoid possible crash when missing browser language.
Do more analytics logic in ruby than javascript.