Legacy Script Notice: This thread originally provided a custom JavaScript snippet designed for ClickFunnels 1.0.
Experience Funnelish v2: Tired of patching together custom code snippets for essential checkout features? We’ve evolved! Funnelish v2 is now a complete e-commerce funnel platform that combines the high-converting sales funnels of ClickFunnels with the powerful backend functionality of Shopify—all in one place.
With Funnelish v2, features like default country selection, advanced shipping rules, and localized checkouts are built right into our native forms. No coding required!
Relevant Links & Resources:
ClickFunnels 2.0 Update: If you are using ClickFunnels 2.0, the original script below may not work as CF 2.0 doesn’t always load jQuery by default and uses different form structures. Use this updated Vanilla JavaScript version in your Tracking Code (Footer) instead:
<script> const FNSH_COUNTRY_CODE = "US"; // Set your default country code here const FNSH_HIDE_COUNTRY_BOX = false; const FNSH_DISABLE_COUNTRY_BOX = false; document.addEventListener("DOMContentLoaded", function() { const countryBoxes = document.querySelectorAll("select[name*='country'], input[name*='country']"); countryBoxes.forEach(function(box) { box.value = FNSH_COUNTRY_CODE; if (FNSH_HIDE_COUNTRY_BOX) { box.style.display = 'none'; } else if (FNSH_DISABLE_COUNTRY_BOX) { box.disabled = true; } }); }); </script>
Did this script work for you? Have any questions about how Funnelish handles localization natively? Drop your feedback in the replies below!
What is “Clickfunnels country auto-selector”?
This script plugin auto-selects a country of your choice and optionally hides it from your end-users. By setting a default value to your Clickfunnels country select box in your order form.
This might help in cases where Clickfunnels fails to track the country field of your customers.
How to add it to your Clickfunnels funnel?
-
Open your Order Form funnel step
-
Click on Edit page button.
-
Go to SETTINGS > TRACKING CODE.
-
Add this script to your FOOTER CODE as it is.
<script>
var FNSH_COUNTRY_CODE = "US";
var FNSH_HIDE_COUNTRY_BOX = false;
var FNSH_DISABLE_COUNTRY_BOX = false;
$(document).ready(function() {
let country_box = $("[name='shipping_country'], [name='country']");
country_box.val(FNSH_COUNTRY_CODE);
if (FNSH_HIDE_COUNTRY_BOX) {
$(country_box).hide();
} else if (FNSH_DISABLE_COUNTRY_BOX) {
$(country_box).attr('disabled', true);
}
});
</script>
- Add an input box* for country to your Order Form, If you haven’t already

Don’t forget to set the Input Type to Shipping Country or Country depending on your use case.
-
Replace “US” (in the second line) with your desired default country ISO code, (e.g. “UK”, “AU”, “GR”…etc).
-
Set
FNSH_HIDE_COUNTRY_BOXtotrueto hide the country box
In case you want to prevent your customers from changing the country value, you may replace thetruevalue above tofalse. that way the country field will be hidden from your customers but the value will be set to the value given. -
Set FNSH_DISABLE_COUNTRY_BOX to
trueto disable the country box
When changed totrue, the country box will be disabled but will still be visible. -
Hit save and that’s it.


