JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>Visitor's location</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>
$(document).ready( function() {
$.getJSON("http://freegeoip.net/json/", function(result){
alert('Country: ' + result.country_name + '\n' + 'Code: ' + result.country_code);
$('#newURL').attr('href','https://www.google.com&jobid='+result.country_code);
});
});
</script>
</head>
<body>
<a id="newURL">URL</a>
</body>
</html>