Overrides settings from dashboard, and exposes some new settings.


window._elev.on('load', function(_elev) {
    articleFeedbackEnabled: true,
    auto_open: false,
    autoInitialize: false,
    autosuggest: false,
    cspStrictCompatibility: true,
    disableDevelopmentWarnings: true,
    disablePushState: true,
    display_type: 'full',
    docked_position: 'floor',
    embeddable_css_file: 'https://example.com/styles.css',
    enabled: false,
    hideLauncher: true,
    kbLink: function(params, defaultKbLink) {
     return 'https://docs.example.help/' + params.languageId + '/support/articles/' + params.externalId;
    keywords: ['keyword1', 'keyword2'],
    loggedin_only: true,
    menuShowUntilClosed: false,
    page_url: 'https://example.com',
    pushin: true,
    main_color: '#000',
    reinitializeOnUrlChange: false,
    tab_teaser: 'Example launcher text',
    side: 'left',



options (required)

An object with the following keys. Note you only need to provide the keys and values you want to change.

  • options.articleFeedbackEnabled
    • true (default) or false
    • Disable article feedback
  • options.auto_open
    • true (default) or false
    • Auto open widget to article on page load if user was viewing it.
  • options.autoInitialize
    • true (default) or false
    • Auto initialize Elevio app. See initialize.
  • options.autosuggest
    • true (default) or false
    • Show automatic article suggestions based on context and user behaviour.
  • options.cspStrictCompatibility
    • true or false (default)
    • Disables some features that are known to conflict with strict CSP policies. The disabled features are: article interlinking, clicking on image in article displays enlarged lightbox, and trigger modules.
    • Alternatively, if you do want to maintain the above features, set this cspStrictComptibility option to false and add 'sha256-AxFRnQ7RApPQMimCmV5Ns+k9k8VCJIZ7ocBcrdAcBVE=' to your CSP headers' script-src 
  •   options.disableDevelopmentWarnings
    • true or false (default)
    • Disables Elevio errors and warnings from appearing in the browser console (not recommended).
  • options.disablePushState
    • true or false (default)
    • Automatically detect changes in the URL and set page_url.
  • options.display_type
    • full (default) or compressed
    • Adjusts the height and width of the widget.
  • options.docked_position
    • wall (default), floor, or button
    • The position of the launcher button that opens the widget. Also see options.side below.
  • options.embeddable_css_file
    • HTTP(S) link to CSS file or null (default)
    • CSS file to style Elevio articles. Note this is for articles only (they cannot be styled normally since they are in an iframe). See custom styling.
  • options.enabled
    • true or false (default)
    • Disable Elevio entirely.
  • options.hideLauncher
    • true or false (default)
    • Hide the launcher button that opens the Elevio widget. See open for how to open the widget yourself.
  • options.kbLink
    • function () { return 'https://api-docs.elevio.help'; } or function () { return undefined; } (default)
    • Override the link to your knowledge base URL that appears beside an article title in the widget.
    • To follow Elevio's URL scheme ({{kbLink}}/{{languageId}}/articles/{{article_id}}), provide a function that returns your desired knowledge base URL.
      • e.g. function () { return 'https://example.com'; }
    • Or to further customise the URL scheme, return a constructed string template using the params below:
      • id: id of article within Elevio
      • externalId: id from synced article's source content management system. i.e. if you have synced an article from Freshdesk, this is the id of the article within Freshdesk
      • languageId: language code (ISO 639-1 Code) of article translation
      • title: article title
      • body: article body
      • e.g.
        function(params, defaultKbLink) {
          return 'https://docs.example.help/' + params.languageId + '/support/articles/' + params.externalId;
    • By default, the link, when customised, will appear besides an article's title, regardless of whether the Elevio Knowledge Base is enabled or disabled. To hide the link when the Knowledge Base is disabled, simply return undefined if the defaultKbLink is undefined
      • e.g.
        function (params, defaultKbLink) {
          return defaultKbLink ? 'https://docs.example.help/' + params.languageId + '/support/articles/' + params.externalId : undefined;
  • options.keywords
    • [] (default)
    • An array of keywords for this page. Also see the helper setKeywords.
  • options.loggedin_only
    • true or false (default)
    • Disable Elevio entirely if user is not set. See setUser.
  • options.menuShowUntilClosed
    • true or false (default)
    • Shows the menu in the widget until the user explicitly clicks the menu icon to close it.
  • options.page_url
    • ‘string’
    • A string to set the URL for page settings. By default, Elevio watches the browser URL. Also see the helper setPage.
  • options.pushin
    • true or false (default)
    • On widget open set an equivalent width margin on the body element. Useful to avoid overlapping site content.
  • options.main_color
    • CSS color (e.g. hex, rgb, etc)
    • Set the main color that appears on various elements throughout Elevio.
  • options.reinitializeOnUrlChange

    N.B. This setting should only be used if you are using Turbolinks

    • true or false (default)
    • Reinitialize Elevio when the browser URL changes
  • options.tab_teaser
    • ‘string’
    • Set the text that appears on the launcher button.
  • options.side
    • right (default) or left
    • The position of the launcher button and the Assistant. Also see options.docked_position above.
  • options.hidePopupWidgetButton
    • true or false (default)
    • When a popup is displayed and hidePopupWidgetButton is set to true the the button to open the article in the Assistant will be hidden.
  • options.stripQueryParams
    • true or false (default)
    • If you would like the query params striped from the Elevio settings call you can set this to be true. NOTE: this doesn't affect the url set in _elev.setPage() or _elev.setSettings({ page_url: '' }).

See also

  • setPage
  • setKeywords
  • setUser
  • setTranslations
  • setLanguage