Presumably as your site has no domain (has no "." in it like "localhost") then you
will need to set _udn="none".
This way Analytics leaves out the domain portion of it's tracking cookies. Another possible way is to setDomainName("none") in GA.js syntax. This prevents Google trying set a domain= on the cookie's and this way they will not fail.
Must admin i have not done this but it would seem the logical way to approach it. Analytics looks for and expects a domain and so fails when it doesn't get one. Stop it looking for one and it shouldn't fail.