Skip to content

3 Easy Steps – Migrate from Google reCAPTCHA to nCAPCTHA

Follow these steps to replace Google reCAPTCHA with Ponta’s standalone nCAPTCHA — complete with clear guidance on placement, button ID usage, custom JavaScript considerations, and embed code best practices.


Prerequisites

  • A Ponta account at https://ads.ponta.co
  • The domain of your website and create an ad-unit
  • An existing form with a submit button that has an id attribute (required for interception)

A. Generate your 9-Choice Embed Code

Step A – Generate your Embed Code
  1. Log in to Ponta Ad Units
  2. In the left menu, select Inventory → Ad Units
  3. Click Add Unit (or Create Ad Unit)
  4. Choose Empty Widget as the template
  5. Under Challenge Type, select 9-Choice
  6. Give the unit a descriptive Name (e.g., “Contact Form Captcha”)
  7. Add any Targeting or Site restrictions as needed
  8. Click Save
  9. In the list of Ad Units, locate your new unit and click Copy Embed Code
  10. This snippet includes both the <ninechoice-widget> tag and the <script> tag you need

Note: The same Ad Unit key can be reused across multiple forms if needed.


1. Remove Google reCAPTCHA

Step 1 – Remove reCAPTCHA code

Open each HTML page using reCAPTCHA and remove its code, for example:

- <script src="https://www.google.com/recaptcha/api.js" async defer></script>
- <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>

Save your changes.


2. Add the 9-Choice Widget

Step 2 – Add the Widget (before the submit button)

Paste the embed code from Ponta inside your form, right before the submit button:

<!-- Embed the 9-Choice Widget -->
<ninechoice-widget
  id="form-verify"
  data-adunit-key="6ffbe9c0-cd5a-4951-a5ed-1df269c2f62c"
  data-intercept-button-id="send-button"
></ninechoice-widget>

<!-- Load the 9-Choice script -->
<script
  type="module"
  src="https://ads.ponta.co/api/ninechoice-widget.iife.js"
></script>
  • id – unique identifier for this widget instance
  • data-adunit-key – your Ad Unit key from Ponta (can be reused across forms)
  • data-intercept-button-id – must exactly match the id of your form’s submit button

Before / After – Migration at a Glance

Compare old reCAPTCHA vs new nCAPTCHA 9-Choice

Before (Google reCAPTCHA)

<form id="contact-form" action="/send" method="POST">
  <label>
    Your Message:
    <textarea name="message"></textarea>
  </label>

  <div class="g-recaptcha" data-sitekey="YOUR_SITE_KEY"></div>
  <button id="send-button" type="submit">Send</button>
</form>

<script src="https://www.google.com/recaptcha/api.js" async defer></script>

After (nCAPTCHA)

<form id="contact-form" action="/send" method="POST">
  <label>
    Your Message:
    <textarea name="message"></textarea>
  </label>

  <!-- Place the widget here, before the submit button -->
  <ninechoice-widget
    id="form-verify"
    data-adunit-key="YOUR_AD_UNIT_KEY"
    data-intercept-button-id="send-button"
  ></ninechoice-widget>

  <button id="send-button" type="submit">Send</button>
</form>

<script
  type="module"
  src="https://ads.ponta.co/api/ninechoice-widget.iife.js"
></script>

✅ The new integration removes Google scripts entirely and replaces them with the lightweight Ponta widget and script.


Example

Step 3 – Full Example Page
<!doctype html>
<html>
  <head>
    <title>Contact Us</title>
  </head>
  <body>
    <form id="contact-form" action="/send" method="POST">
      <label>
        Your Message:
        <textarea name="message"></textarea>
      </label>

      <!-- Place the widget here, before the submit button -->
      <ninechoice-widget
        id="form-verify"
        data-adunit-key="6ffbe9c0-cd5a-4951-a5ed-1df269c2f62c"
        data-intercept-button-id="send-button"
      ></ninechoice-widget>

      <button id="send-button" type="submit">Send</button>
    </form>

    <!-- Load the Ponta 9-Choice script (production URL) -->
    <script
      type="module"
      src="https://ads.ponta.co/api/ninechoice-widget.iife.js"
    ></script>
  </body>
</html>

Custom JavaScript Considerations

Important: Using custom JavaScript submit handlers
  • If your form uses a custom submit handler in JavaScript, the widget will still intercept the button click and block submission until the challenge is passed.
  • Ensure that your handler listens to the form’s submit event after the widget has allowed submission.
  • Avoid disabling the submit button programmatically before the widget runs.

3. That’s It!

  • No additional JavaScript or back-end changes are required for a basic standalone setup.
  • The widget intercepts the submit button, runs the 9-Choice challenge, and allows your form to submit upon success.

Your forms now run Ponta’s nCAPTCHA challenge instead of Google reCAPTCHA!