API

New widget

You can check out our documentation here: https://docs.smartsupp.com/

Configuration

You can modify your own chat code. Enter your configuration after the line with _smartsupp.key All examples are explained below with screenshots and code samples.

<script>
  var _smartsupp = _smartsupp || {};
  _smartsupp.key = "YOUR_SMARTSUPP_CODE";
  // ...
  // your configuration
  // ...
  window.smartsupp||(function(d) {
    var s,c,o=smartsupp=function(){ o._.push(arguments)};o._=[];
    s=d.getElementsByTagName('script')[0];c=d.createElement('script');
    c.type='text/javascript';c.charset='utf-8';c.async=true;
    c.src='https://www.smartsuppchat.com/loader.js?';s.parentNode.insertBefore(c,s);
  })(document);
</script>

Example:

_smartsupp.cookieDomain = ".your-domain.com";

Possible configurations:

Configuration Options Description

_smartsupp.key

basic chat key

_smartsupp.cookieDomain

.your-domain.com

Smartsupp visitor is identified by unique key stored in cookies. By default chat conversation is terminated when visitor opens a sub-domain on your website. You should set main domain as cookie domain if you want chat conversations uninterrupted across your sub-domains. Insert the cookieDomain parameter in your chat code on main domain and all subdomains where you want the chat conversation uninterrupted.

_smartsupp.hideWidget

true, false

hide widget on specific page

_smartsupp.hideMobileWidget

true, false

Hide widget on mobile devices

_smartsupp.privacyNoticeEnabled

true, false

Privacy notice

_smartsupp.privacyNoticeUrl

url

custom URL for Privacy notice

_smartsupp.orientation

‘left’, ‘right’

chat position

_smartsupp.gaKey

UA-XXXX-Y

specific GA key

_smartsupp.gaOptions

foo.example.com

cookie domain

_smartsupp.gaName

your_tracker_name

specific Google Analytics Tracker Name

_smartsupp.ratingEnabled

true, false

display rating window after the conversation is resolved

API

Example:

<script>

  smartsupp('group', 'GROUP_ID');

</script>

API: 

Code Options Description

smartsupp(‘group’)

groupID

Groups are only available in the PRO package. See this tutorial to check how groups work:

www.smartsupp.com/help/groups

smartsupp(‘language’)

en, cs,…

language of the chat box. All available languages can be found here:

https://docs.smartsupp.com/examples/multilanguage-chat-box/

smartsupp(‘name’)

‘John Doe’

visitor info name

smartsupp(’email’)

‘john.doe@example.com’

visitor info email

smartsupp(‘phone’)

‘+420123456’

visitor info phone

smartsupp(‘variables’)

more information can be found here:
https://docs.smartsupp.com/examples/detailed-visitor-info/

smartsupp(‘theme:color’)

‘#ff0000’

set main color

smartsupp(‘chat:message’)

‘text’

fill text to textarea

smartsupp(‘chat:open’)

open widget

smartsupp(‘chat:close’)

close widget

smartsupp(‘recording:disable’)

recorder.js still loaded – but not recording. Use on specific pages

smartsupp(‘recording:off’)

recorder.js not loaded