Overview

  • The uBind wordpress plugin allows a uBind product form to be injected into a page on a wordpress website. The plugin itself does two main things:
  • In the HTML head, it adds the following script tag:
  • <script async="true" src="https://app.ubind.io/assets/ubind.js" type="text/javascript"></script>
  • In the HTML body, it adds the following element in place of the wordpress short code:
  • <div class="ubind-product" data-tenant="tenant-key" data-product-id="product-key" data-environment="environment"></div>
  • Then, when the page loads, the ubind javascript will load, run, and find the div. It will then read the tenant id, product id and the environment, and load the uBind form into that div.
  • Typically the environment will be “production”, however possible other values are “staging” or “development”.
  • You will need to ask the uBind team for your specific tenant and product id.

Installation

  • 1. Download uBind wordpress plugin zip file from wordpress.org or obtain a copy of the plugin zip file from the uBind team, there is also a download link at the bottom of this page.
  • 2. Log in to your wordpress site’s administration console.
  • 3. Install the plugin by uploading the zip file into the plugins section.
  • 4. Activate the Plugin.

Configuration

  • 1. (optional) If the wordpress setup uses dotEnv set the following parameters:
    • Define your Default uBind configuration with the following configuration fields:
    • UBIND_PRODUCT = “<product-id>”
    • UBIND_ENVIRONMENT = “<environment>”
    • If you have more than one uBind form to configure, you can setup the parameters as:
    • UBIND_PRODUCT_ID_1 = “<1st product-id>”
    • UBIND_ENVIRONMENT_1 = “<1st environment>”
    • UBIND_PRODUCT_ID_2 = “<2nd product-id>”
    • UBIND_ENVIRONMENT_2 = “<2nd environment>”
    • Other fields you can include in the configuration
    • UBIND_TENANT_ID = “<tenant-id>”
    • UBIND_SHORTCODE = “<short-code>”
    Always suffix an incremental number beside the dotEnv entry if there are more than one. The default uBind form values can either have a suffix of zero or no suffix.
ubind-admin-1
  • 2. Go to the wordpress dashboard. At the left sidebar, click on the uBind Settings link and complete the data for each of the fields, select an environment and click on the save changes button.
    You can add more uBind form configurations by using the Add New button at the bottom of the screen. Added form values will have checkboxes beside each field, you may check the boxes to load the values from the default form configuration.
    For the short code, check the box beside the short code entry and click save to generate a short code. The generated short code will be based from the first 4 letters each of the tenant ID, product ID and environment values. In cases of duplicate shortcodes, the generated shortcode will be suffixed with a numerical value. e.g. [tena_prod_1].
    To create a custom short code. Uncheck the box beside the short code entry, then click save. In case there is a duplicate, the admin UI will give an error notice when you try to save it. Replace the duplicate custom short code and click save to remove the duplicate error notice.
ubind-admin-2

uBind forms will be listed in the Admin UI. To edit or view a form configuration, click on the form title or hover and click on the Quick Edit link.

To delete a form configuration, mouse over the form title then click on the Delete link. You can also delete a form by using the Delete button at the bottom of each form section.

ubind-admin-3
  • 3. To display a uBind form on any page or post within your wordpress site, copy the associated short code from the Admin UI and paste it in your pages or posts content.
    You can also create your own custom shortcode from the admin interface by unchecking the box beside the short code to enable the text entry box. Enter the preferred shortcode then click on save button. You can then use the custom short code to display the associated uBind form.

Changelog

  • 1.3
  • Updated the element inserted in the html body to use property data-tenant.
  • 1.2
  • Added support for multiple uBind form configurations.
  • Merge .env configurations with none .env configurations.
  • Added support for a default configuration that can be used by other form configurations.
  • 1.1
  • Added support for .env file configuration.

Discover how uBind can help your company sell insurance online

Request a free consultation and a member of our team will guide you through the key features and capabilities of the platform.

A member of our team will contact you within one business day

  Call us now on 1300 824 631