<script>

        $.getJSON("https://api.ipify.org?format=json",
                                          function(data) {
            $("#914201_34287pi_914201_34287").val(data.ip);
        })
</script><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script>

        var ipinfo;

        $.getJSON("https://ipinfo.io", function (data) {

            $("#914201_34289pi_914201_34289").val(data.country);
            $("#914201_34291pi_914201_34291").val(data.city);
        })
</script>


<script type="text/javascript">
        // Parse the URL
        function getParameterByName(name) {
            name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
            var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
            results = regex.exec(location.search);
            return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
        }
        // Give the URL parameters variable names
        var source = getParameterByName('utm_source');
        var medium = getParameterByName('utm_medium');
        var campaign = getParameterByName('utm_campaign');
        var term = getParameterByName('utm_term');
        var content = getParameterByName('utm_content');
        var gads_gclid = getParameterByName('gclid');
        var fb_fbclid = getParameterByName('fbclid');
        var handl_ip = getParameterByName('handl_ip');
        var handl_ref = getParameterByName('handl_ref');
        var handl_url = getParameterByName('handl_url');
        var first_source = getParameterByName('first_utm_source');
        var first_medium = getParameterByName('first_utm_medium');
        var first_campaign = getParameterByName('first_utm_campaign');
        var first_term = getParameterByName('first_utm_term');
        var first_content = getParameterByName('first_utm_content');
        var first_ref = getParameterByName('handl_original_ref');
        var first_lp = getParameterByName('handl_landing_page');

        // Put the variable names into the hidden fields in the form. selector should be "p.YOURFIELDNAME input"
        document.querySelector("p.utm_source input").value = source;
        document.querySelector("p.utm_medium input").value = medium;
        document.querySelector("p.utm_campaign input").value = campaign;
        document.querySelector("p.utm_term input").value = term;
        document.querySelector("p.utm_content input").value = content;
        document.querySelector("p.gads_gclid input").value = gclid;
        document.querySelector("p.fb_fbclid input").value = fbclid;
        document.querySelector("p.handl_ip input").value = handl_ip;
        document.querySelector("p.handl_ref input").value = handl_ref;
        document.querySelector("p.handl_url input").value = handl_url;
         document.querySelector("p.first_utm_source input").value = first_source;
        document.querySelector("p.first_utm_medium input").value = first_medium;
        document.querySelector("p.first_utm_campaign input").value = first_campaign;
        document.querySelector("p.first_utm_term input").value = first_term;
        document.querySelector("p.first_utm_content input").value = first_content;
        document.querySelector("p.handl_original_ref input").value = first_ref;
        document.querySelector("p.handl_landing_page input").value = handl_landing_page;
</script>