Getting Started

This SDK is deprecated in favor of the Core and UI JS SDKs.

Migrating to the latest SDKs

  1. Update/add the script location/packages and initialize SDK:

  2. Check the new method signatures and update them.

    The Core and UI JS SDKs return Promises: replace callback passed as arguments, with then().

    For instance:

Browser compatibility

The SDK is compatible with the latest versions of:

  • Edge,

  • Chrome,

  • Firefox,

  • Safari,

  • and IE 11.

Prerequisites

To initialize the ReachFive client, you need a Domain URL and a Client ID.

For more information, refer to Domain and client configuration.

For security reasons, you have to whitelist all available domains where the ReachFive SDK will be used.

This has to be done in the Allowed Origins (CORS) field of your ReachFive console, in the Settings menu.

The ReachFive client detects the user locale from the browser, and you can override the local at initialization by providing a language. Supported languages are: en, es, fr, it, nl.

Installation

The SDK is served as a JavaScript asset from your ReachFive domain.

You must include it with a <script> in the <head> part of your page:

<script async src="https://{DOMAIN}/js/v1/identity.js?client_id={CLIENT_ID}"></script>

To override the client’s locale:

<script async src="https://{DOMAIN}/js/v1/{LANGUAGE}/identity.js?client_id={CLIENT_ID}"></script>

Don’t forget to replace the {DOMAIN}, {CLIENT_ID} and {LANGUAGE} parameters.

Include the following script at the end of the <body> element to prevent it from blocking the render of the rest of the page:

<script type="text/javascript">
  window.reach5=window.reach5||function(){(reach5.q=reach5.q||[]).push(arguments)};
  // Your code...
</script>

Now you can use the reach5 global variable to access the different methods of the legacy client.