Skip to main content

SDK Setup

View your app configuration, integration status, and SDK credentials.

Overview

The SDK Setup page provides:

  • Your App Key for SDK initialization
  • Integration instructions (AI assistant, manual, and CDN)
  • Live status indicator showing whether the SDK is receiving events

Navigate to Settings > SDK Setup in the admin dashboard.

App Key

Your App Key is required to initialize the Deway SDK.

Finding Your App Key

  1. Navigate to Settings > SDK Setup
  2. Copy the App Key shown on the page (click the copy button)

Security

  • Don't commit your App Key to public repositories
  • Use environment variables in production
// React / Create React App
Deway.init({
appKey: process.env.REACT_APP_DEWAY_APP_KEY
});

// Vite
Deway.init({
appKey: import.meta.env.VITE_DEWAY_APP_KEY
});

Integration Methods

The SDK Setup page offers three integration methods:

Copy the pre-built prompt from the SDK Setup page and paste it into your AI coding assistant (Claude, Copilot, etc.). The prompt:

  1. Detects your framework and package manager
  2. Installs the @deway-ai/web-sdk package
  3. Initializes the SDK with your App Key
  4. Sets up user identification

This is the fastest way to get started — the prompt adapts to your project automatically.

Manual Installation

npm install @deway-ai/web-sdk
import Deway from '@deway-ai/web-sdk';

Deway.init({
appKey: 'your-app-key'
});

// Identify users after authentication
if (user?.id) {
Deway.identify(user.id);
}

CDN Integration (HTML/JavaScript)

For vanilla JavaScript or HTML projects without a build system:

<script src="https://unpkg.com/@deway-ai/web-sdk/dist/loader.umd.js"></script>
<script>
Deway.init({
appKey: 'your-app-key'
});

// Identify user when available
if (user?.id) {
Deway.identify(user.id);
}
</script>

SDK Status

The SDK Setup page shows real-time verification that your integration is working.

StatusDescription
LiveSDK is connected and events received in the last 7 days
No EventsSDK installed but no events received recently
ErrorUnable to check status

Once you've integrated the SDK and users interact with your app, the status will turn green.

Multiple Projects

If your tenant has multiple projects, each project has its own:

  • App Key
  • SDK configuration
  • Knowledge Base
  • Chats

Switch between projects using the project selector in the sidebar header.

Troubleshooting

Status Shows "No Events"

  1. Verify the SDK is installed correctly
  2. Check browser console for errors
  3. Ensure Deway.init() is called on page load
  4. Verify you're using the correct App Key

Events Not Being Tracked

  1. Ensure users are identified with Deway.identify()
  2. Check that the SDK is initialized before identifying
  3. Verify the correct App Key is being used
  4. Look for JavaScript errors on the page

Next Steps