I am using google API to detect client location however it always shows to me "Your Location Was Not Detected By Google Loader".
I need to find country code of the client location however it is not working for me.
<script src="http://www.google.com/jsapi" language="javascript"></script>
<script language="javascript">
if (google.loader.ClientLocation != null) {
document.write("Your Location Is: " + google.loader.ClientLocation.address.country_code);
} else {
document.write("Your Location Was Not Detected By Google Loader");
}
</script>