Newsletters are a great way to engage with your customers. Since most people are picky about who they receive email from, it's important to make sure that the customers who sign up for your newsletters actually intended to subscribe. 

For that reason, most email opt-in forms include a some form of additional confirmation, often in the form of a CAPTCHA code. This step helps ensure that a subscription is intentional, while also preventing bots from utilizing an email address without the owner's knowledge. 😮 

Fun Fact: "CAPTCHA" stands for "Completely Automated Public Turing test to tell Computers and Humans Apart"!

Newsletter Signups in Volusion

When it comes to newsletter subscriptions, Volusion follows industry best practices. Our software requires users to complete the CAPTCHA code before submitting the form on your website's newsletter signup page, located at:

http://[YOURSTOREURL]/mailinglist_subscribe.asp

(In the example above, the [YOURSTOREURL] value would be replaced with your website's domain name.)

If you use a Volusion theme, you probably have a newsletter signup field in the footer of your website. It looks something like this:

The code that makes this field function does note support the classic CAPTCHA form. Therefore, once a visitor enters an email address and clicks the submission arrow icon, the website redirects to the /mailinglist_subscribe.asp page. There, the visitor must confirm the email address, adds a first name (optional), and complete a classic CAPTCHA test:

Using Google reCAPTCHA to Simplify Signup Confirmation

While most prospective subscribers are fine with reentering some information, some may have a problem completing the CAPTCHA code provided. If you're concerned about the experience, you can simplify the process by using Google reCAPTCHA code for your store, then manually modifying the footer code for your theme.

Google reCAPTCHA is a simplified CAPTCHA test that has users answer a simple question and/or select a check box that says "I'm not a robot." Your Volusion Admin Area has a dedicated reCAPTCHA page that lets you integrate the code in multiple areas of your store.

Step 1: Get reCAPTCHA Keys from Google

First, you'll need to register your store with Google reCAPTCHA to generate Site Key and Secret Key values.

  1. Visit the main Google reCAPTCHA page and click Get reCAPTCHA.
  2. In the Label field under Register a New Site, enter "VOLUSION-captcha".
  3. Select reCAPTCHA v2.
  4. In the Domains text area, enter your store's domain name (for example: "myvolusionstore.com").
  5. Accept the reCAPTCHA Terms of Service, then click Register.

On the next page, look for the Keys heading in red. You'll need the Site key and Secret key values for the next step. Be sure to either copy and paste these values to a text file, or keep this browser tab open.

Step 2: Add reCAPTCHA Keys to Volusion

In a new tab or window, log in to your Volusion store's Admin Area and go to Design > reCAPTCHA.

  1. If the Enable check box isn't selected, select it.
  2. Under the Configuration heading, paste the Site Key and Secret Key values you just generated with Google.
  3. In the Size drop-down menu, select Normal. Note that the Invisible option won't work for this configuration.
  4. Under Use reCAPTCHA On These Pages, select the mailinglist_subscribe.asp check box.
  5. Click Save.

Step 3: Add Custom Code to Theme

The last step involves modifying the HTML code for your theme. Before making changes to your theme's code, you should always make a back-up copy in case you need to restore it. For instructions, see How to Archive Your Current Theme.

  1. Go to Design > File Editor.
  2. In the Shortcuts list on the right, locate the Theme File that ends in ".html". It will likely be formatted as template_XXX.html, where "XXX" is a number or the title of your theme.
  3. Find the section of code pertaining to your newsletter signup, which will be enclosed by "form" tags. You may need to search on the page (CTRL + F) for the term "elist" to locate the appropriate area.
  4. Locate the closing form tag, </form>, then copy and paste the following code right above it:
<!-- VOLUSION - add captcha to footer email -->
<input type="hidden" name="reCapPH" value="true">
<script>
  function modalReCaptchaInsert() {  
        var footerElistForm =  document.querySelector(".footer .elist form[action='/mailinglist_subscribe.asp']");
        if (footerElistForm && typeof reCaptchaInit === "function") {
            var reCapDiv = document.createElement('div');
            reCapDiv.dataset.vRecaptcha = "on";
            footerElistForm.appendChild(reCapDiv);
            reCaptchaInit(".footer .elist");
        } else {
            console.warn("Volusion newsletter not found in footer");
        }
  }
  setTimeout(modalReCaptchaInsert, 1000);
</script> 

Once you've pasted the script into your theme's HTML file, click Save.

Now, when a prospective subscriber submits an email address through the footer form and is redirected to /mailinglist_subscribe.asp, he or she will only need to select the "I'm not a robot" checkbox to confirm subscription.

Be sure to check out the other ways you can implement Google reCAPTCHA throughout your store, and learn more about Newsletters here!

Did this answer your question?