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_BOX to true to hide the country box
In case you want to prevent your customers from changing the country value, you may replace the true value above to false. 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 true to disable the country box
When changed to true, the country box will be disabled but will still be visible.
A really nice plugin does the job correctly and doesn’t affect my order form load time. In fact, it increased the conversion rate a bit and decreased the error rate on our order form as well. Most people used to write inconsistent answers on the order form (e.g. “US”, “USA”, “united states”, “America”…etc)
This code removes the entire address selection on my funnels. Any idea what to do in order to keep the address but not the country (or have the country set to a specific country)?
Hello Samlee, Is there a way to select a country by default and do not allow customers to change it? whithout making the whole country selection dissapear? I want the to be visible but do not allow changing it.
I changed the code above and edited the article to add the ability to disable the country selector, by changing the “FNSH_DISABLE_COUNTRY_BOX” variable.
The setting to hide the country box though is a problem as then the button pops up and is covered by the zipcode box. Not sure why it does that so I just left it visible but set it to prepop to United States.
You can see my working sample at this site:
(although I’m guessing this link might be removed as not allowed… not trying to advertise but just show a sample of this code snippet in working order)
I need a code like this for Click Funnels 2.0 but cant seem to get it to work. I also need to preselect and prevent selection of the State field too - would anyone be able to help with this?