Free Plugin: Clickfunnels country auto-selector

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?

  1. Open your Order Form funnel step
    clickfunnels order form funnel step

  2. Click on Edit page button.
    clickfunnels-edit-page

  3. Go to SETTINGS > TRACKING CODE.
    clickfunnels SETTINGS > TRACKING CODE menu

  4. 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>

  1. Add an input box* for country to your Order Form, If you haven’t already
    Clickfunnels country order form box

Don’t forget to set the Input Type to Shipping Country or Country depending on your use case.

  1. Replace “US” (in the second line) with your desired default country ISO code, (e.g. “UK”, “AU”, “GR”…etc).

  2. 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.

  3. 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.

  4. Hit save and that’s it.

2 Likes

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)

1 Like

Simple solution, thanks so much - exactly what I needed for a physical (big!) product funnel. Cheers!

Actually - doesn’t seem to work with the updated address module in CF :frowning:
I’m guessing it’s an easy fix but my hacking didn’t get it to work :slight_smile:

Hello,

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)?

1 Like

Can you share a sample link to a landing page or order form where you have that code to see what you mean perhaps that can help us fix the issue!

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.

thanks a lot!

1 Like

Hello, Is there a way to select a country by default,but do not allow customers to change it? Without making the whole country selection dissapear?

I want the to be visible, but not allowing my customers to change it.

1 Like

Hello @eliotcorral,

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.

Copy the new code from the first post, scroll up or click here: Free Plugin: Clickfunnels country auto-selector.

thanks! I also got this code and it worked (just change MX with the desired country code)

This little code snippet worked great for me.

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?