Setup Guide

Installation manual for IT staff at client companies.
Instructions for installing the Widget on your company site.

Overview

EAP Widget can be installed by simply adding a single JavaScript tag to your site. After installation, a chat button appears in the bottom-right corner, allowing employees to access mental health support features.

Installation Steps

Step 1: Get the Code

Copy the following code.

<script
  src="https://widget.kazunalab.com/eap/v1/widget.js"
  data-token="your-access-token"
  data-lang="en"
  data-position="bottom-right">
</script>

Important: Replace your-access-token with the token provided at contract signing.

Step 2: Add to HTML

Add the code just before the </body> tag in your HTML.

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Your Company Site</title>
</head>
<body>
  <!-- Your site content -->

  <!-- EAP Widget (place just before </body>) -->
  <script
    src="https://widget.kazunalab.com/eap/v1/widget.js"
    data-token="xx-xxxx-xxxx-xxxx"
    data-lang="en"
    data-position="bottom-right">
  </script>
</body>
</html>

Step 3: Verify

After installation, verify the following.

  1. Chat button appears in the bottom-right corner
  2. Clicking the button opens the Widget
  3. You can have a conversation using "AI Chat Consultation"

Parameter Reference

Parameter Required Description Example
data-token Yes Your access token "xx-xxxx-xxxx-xxxx"
data-lang No Language (ja/en) "en" (default: ja)
data-position No Button position "bottom-right" or "bottom-left"
data-guide No Show guide "true"
data-guide-delay No Guide delay (seconds) "3"

Show Guide Message

To display a guide for first-time visitors:

<script
  src="https://widget.kazunalab.com/eap/v1/widget.js"
  data-token="xx-xxxx-xxxx-xxxx"
  data-lang="en"
  data-guide="true"
  data-guide-delay="3">
</script>

JavaScript API

You can open the Widget from buttons or links.

// Open the Widget
EapWidget.open();

// Close the Widget
EapWidget.close();

Usage Example

<button onclick="EapWidget.open()">Open Consultation</button>

Troubleshooting

Button doesn't appear

  • Verify the script tag is correctly written
  • Check that the token is correct
  • Check browser developer tools (F12) for errors

"Authentication failed" message

  • Verify the token is correct
  • Check if the token has expired

Overlaps with other elements

Change button position to bottom-left:

data-position="bottom-left"

System Requirements

  • Google Chrome (latest)
  • Safari (latest)
  • Firefox (latest)
  • Microsoft Edge (latest)

Related Documentation