Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Paste the copied JavaScript code snippet above the closing </body> tag of your website's source 
code.

If you need to add the logic that needs to be called only after the Chat initialisation, you can use initCallback from spartezSupportChat object:

Code Block
languagejs
titleExample
<script type="text/javascript">
  var spartezSupportChat = {
    portal: 1,
    cloud: {
      jiraId: '...',
      jiraUrl: '...',
      urls: {
        rest: 'https://chat-api.spartez-software.com',
        ws: 'https://chat-ws.spartez-software.com'
      },
    },
    initCallback: (async (chatLoader) => {
      console.log('Initializing Chat...');
      await chatLoader();
      // do something after Chat is fully loaded
    }),
  };

5. Remember to save the changes

...