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 Client ID.

  • You must whitelist all available domains where the ReachFive SDK will be used.

    This is 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. You can override this at initialization by providing a language.

Currently, we support:

  • de - Deutsch

  • en - English

  • es - Español

  • fr - Français

  • it - Italiano

  • nl - Nederlands

  • ru - Ру́сский (Russian)

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.

Feedback