Getting Started
This SDK is deprecated in favor of the Core and UI JS SDKs. See Migrating to the latest SDKs to use the latest Core and UI SDKs.
| 
 Support for the Legacy JS SDK ends on 28 February, 2021.  | 
Migrating to the latest SDKs
- 
Update/add the script location/packages and initialize SDK:
 - 
Check the new method signatures and update them.
For instance:
 
Browser compatibility
The SDK is compatible with the latest versions of:
- 
Chrome (except in incognito mode)
 - 
Firefox
 - 
IE 11
 
| Safari and Edge are supported up to the latest version where third party cookies are allowed. Please see the Safari and Edge documentation for more information. | 
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 as shown in the steps below. 
  | 
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.