Set defaultCountry to 'auto' to perform a JSONP request to ipinfo.io, which returns the user's country based on their IP address.
<input id="phone" type="tel">
$("#phone").intlTelInput({
defaultCountry: "auto",
utilsScript: "../../lib/libphonenumber/build/utils.js" // just for formatting/placeholders etc
});