Skip to main content

Documentations

Connexease Mini

With this document, you will be able to add additional features to the Connexease Mini product.

Additional Features

  1. Conversation Link Tracking
  2. Auto Authentication

New Embed Code

First of all, you should re-embed the Mini on your site with the new embed code.

!function(){
  let e="https://mini.connexease.com",
      t=document.getElementsByTagName("script")[0],
      s=document.createElement("script"),
      a=document.createElement("script"),
      n=document.createElement("link");
  a.type="text/javascript", 
  a.async="true", 
  a.src=`${e}/assets/crawler.min.js`, 
  s.type="text/javascript", 
  s.async="true", 
  s.src=`${e}/assets/mini.min.js`, 
  n.rel="stylesheet", 
  n.href=`${e}/assets/mini.min.css`,
  document.head.appendChild(n),
  document.head.appendChild(s),
  document.head.appendChild(a),
  t.parentNode.insertBefore(a, t),
  t.parentNode.insertBefore(s, t)
}();

Warning:

You need to use the new embed code. Otherwise, it is not possible to use additional features.

mini.crawler (Tracking Library)

After embedding the Mini, you need to initialize the library.

window.Mini.initialize()

This code assigns a value named __mc_INITIALIZE to localStorage. The library will continue to run until that value is deleted from there.

You can run the code below to find out if the library is active. When this code returns true, mini.crawler has started running.

window.Mini.initialized

When you click on the links of Connexease conversations on your site, the mini opens automatically and the conversation is selected. For this feature to work properly, the links must follow a specific structure. Below are examples of correct and incorrect links.

// Correct Link Structure
// https://mini.connexease.com/conversation?id={{conversationUuid}}

// Incorrect Links Structure
// https://mini.connexease.com
// https://connexease.com
// https://mini.connexease.com/id={{conversationUuid}}
// https://mini.connexease.com/conversation={{conversationUuid}}
// https://mini.connexease.com/{{conversationUuid}}

Auto Login

If you want your user to log in to Mini automatically after logging in to your site, provide the correct Mini login information and run the following code:

window.Mini._setAuth('username', 'password')

This information is stored in an encrypted format.

To clear this login data, use the following code:

window.Mini._clearAuth()