Javascript Widget - Overview

Clearout Javascript Widget comes handy for non-developers to easily integrate real-time verification to all kinds of online forms. This will let a user capture all valid prospects right at the time of form filling avoiding the loss of any opportunity

Clearout

Getting Started with Javascript Widget

Create your Javascript Widget from the Apps page by clicking on 'Create App' and by choosing run type as 'Client'. As part of Clearout Apps creation you will be asked to decide how and where the validation needs to be performed. This helps prevent the mishandling of credits and from abusers by setting access threshold across domain, URL and/or IP.

Clearout

Security Configuration:

1

Limit Usage:

You can take full control in avoiding abuse by limiting the usage specifying the domains or IP addresses from which the verification should happen. This will further help in using the credits effectively. It is always advisable to specify a limit either at a global level or specific to IPs. Failing to do so might deplete the credit balance sooner. There will be no limits applied by default.

Clearout
2

Whitelist Domains:

We help in whitelisting the URLs from which the verification can happen. Only the URLs that are added as part of the whitelist will be allowed to verify the emails captured in the form.

Clearout

Get your Javascript Widget up and working:

Once the client side app is created, you will be provided with a code snippet that needs to be inserted anywhere before the closing body tag. The client side app starts verifying the emails once the snippet is saved as part of the form.

      
        <script>
          var clearout = window.clearout = window.clearout || [], 
          opts = { 
            app_token: "34e1049887d366a4e30560be:e4e9e1104d251e84f3011bed7b89249792913cd", 
            mode: "ajax"
          };
          clearout.push(["initialize", JSON.stringify(opts)]), 
              function () { 
                var t = document, e = t.createElement("script"), 
                a = t.getElementsByTagName("script")[0]; 
                e.type = "text/javascript", e.async = !0, 
                e.src = "https://clearout.io/wp-content/co-js-widget/clearout_js_widget.js", 
                a.parentNode.insertBefore(e, a) 
              }();
        </script>
          
      
    

With the mentioned snippet's basic settings you can capture the valid business email addresses. In case you wanted to accept free accounts or other such accounts, you can make use of the advanced settings.

Advanced Settings:

Once the code snippet is generated, you can specify the settings for the widget against the 'opts'. Initially the code snippet only contains 'app_token' which is the user identifier and 'mode' which is configured to ajax by default. These settings are enough to make the widget working. You can configure the additional settings as below;

                
                  <script type="text/javascript">
                    var clearout = window.clearout = window.clearout || [];
                    var opts = {
                  
                        app_token: YOUR_API_TOKEN,
                        /**
                          *Replace 'YOUR_API_TOKEN' with your public token
                          */
                  
                        block_role_account: true,
                        /**
                          *The option to accept or reject the Role based accounts (true/false) - default is 'false'
                          */
                  
                        block_free_account: true,
                        /**
                          *The option to block Free accounts (true/false) - default is 'false'
                          */
                  
                        block_disposable_account: true,
                        /**
                          *The option to block Disposable accounts (true/false) - default is 'true'
                          */
                  
                        block_unknown_status: false,
                        /**
                          *The option to block the emails that Clearout verification gives Unknown result (true/false) -
                          *default is 'false'
                          */
                  
                        block_catchall_status: false,
                        /**
                          *The option to block the emails that Clearout verification gives Catchall result (true/false) -
                          *default is 'false'
                          */
                  
                        timeout: 10,
                        /**
                          *The option to define the maximum time that can be used for verifying the status of the given
                          *email address (Number in Seconds)
                          */
                  
                        feedback: true,
                        /**
                          *The option to show feedback message for invalid emails (true/false) - default is 'true'
                          */
                  
                        feedback_invalid_classname: error-msg,
                        /**
                          *The option to specify the class name to refer invalid CSS(String) - default is 'error-msg'
                          */
                  
                        feedback_invalid_message: "Invalid email address",
                        /**
                          *The option to specify the String to be displayed when invalid email is entered -  default is "Invalid
                          * email address"
                          */
                  
                        feedback_free_account_message: "Invalid - Free account not allowed",
                        /**
                          *The option to specify the String to be displayed when free account email is entered - default is "Invalid
                          * - Free account not allowed"
                          */
                  
                        feedback_role_account_message: "Invalid - Role account not allowed",
                        /**
                          *The option to specify the String to be displayed when role based email is entered - default is "Invalid - Role account not allowed"
                          */
                  
                        feedback_disposable_account_message: "Invalid - Disposable account not allowed",
                        /**
                          *The option to specify the String to be displayed when Disposable email is entered - default is "Invalid - *Disposable account not allowed"
                          */
                  
                        feedback_unknown_message: "Unable to verify the email address, try after sometime",
                        /**
                          *The option to specify the String to be displayed when Clearout gives Unknown status post verification default is "Unable to verify the email address, try after sometime"
                          */
                  
                        feedback_catchall_message: "Catch All email not acceptable, please enter a different email address",
                        /**
                          *The option to specify the String to be displayed when Clearout gives Catchall status post verification - default *is "Catch All email not acceptable, please enter a different email address"
                          */
                  
                        mode: "ajax",
                        /**
                          *The option to specify the desired mode of verification (ajax/formSubmit) - default is "ajax"
                          */
                  
                        selector: "user_email",
                        /**
                          *The option to specify the email field using specified selector for which verification should happen (classname eg:user_email) - default is empty
                          */
                  
                        debug: true,
                        /**
                          *The option to specify debug console (true/false) - default is 'true'
                          */
                  
                        elements: [{selector: 'ANY SELECTOR' ,opts:'ANY OF THE ABOVE MENTIONED OPTIONS'}],
                        /**
                          *This block can be used to `configure any element in the form specifying the selector and the equivalent options as a array - default is empty array
                          */
                  
                        inspect: true
                        /**
                          *The option to specify if the field getting verified needs to be highlighted with a border or not default is ‘false’
                          */
                      };

                      clearout.push(["initialize", JSON.stringify(opts)]),
                      function () {
                        var t = document, e = t.createElement("script"), a = t.getElementsByTagName("script")[0];
                        e.type = "text/javascript", e.async = !0, 
                        e.src = "https://clearout.io/wp-content/co-js-widget/clearout_js_widget.js",
                        a.parentNode.insertBefore(e, a)
                      }();
                            
                </script>
                    
                
              

Activate / Deactivate the apps:

If you want to disable any app temporarily, you can click on the toggle button against the app under the status column. Verification will not be carried out as long as the status of the app remains ‘Inactive’. You can resume the verification by turning the toggle to an active state.

Clearout

Deleting the unused / old apps:

Any unused app can be deleted by clicking the delete icon against the app. On hovering over the app name, the option to delete will be visible.

Clearout

Reset / Regenerate the Token:

Whenever an abuse is identified while you are still in control of the usage,you may reset the apps. Resetting any app, provides two options;

  1. Deactivating the existing token in use . The token will expire immediately(in case of an abuse identified)
  2. Keep the already active token working for an hour post resetting(which might be helpful in case of migrating to a newer setup). Once the first hour completes, the old token will not work.
Clearout

It is always advisable choosing ‘Expire Immediately’ if any sort of abuse is identified. On successful resetting of the token, make sure to update the form code with the new token.