> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scentxp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

## Adding ScentBot to your website

ScentBot is a web component (`<scentbot-widget>`) that loads via a single script file. This guide covers the three steps to get it running on your page.

## Step 1: Load the widget script

Add the ScentBot runtime script to your page. Place it before the widget tag, ideally in the `<head>` or at the end of the `<body>`:

```html theme={null}
<script src="https://scentbot.widgets.scentxp.net/index.iife.js" type="application/javascript"></script>
```

This script registers the `<scentbot-widget>` custom element. It loads asynchronously and initializes the widget once the DOM is ready.

## Step 2: Load fonts

ScentBot uses **Graphik** and **Dover Serif** as its default fonts. Add the following `@font-face` declarations to your CSS:

```css theme={null}
@font-face {
  font-family: "Graphik";
  src: url("path/to/Graphik-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Graphik";
  src: url("path/to/Graphik-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Graphik";
  src: url("path/to/Graphik-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Dover Serif";
  src: url("path/to/DoverSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}
```

<Note>
  Replace the `src` URLs with the actual paths where your font files are hosted. ScentXP provides the default font files during onboarding. You can substitute your own brand fonts by overriding these declarations or using the `styles` attribute to load a custom CSS file.
</Note>

## Step 3: Add the widget

Insert the `<scentbot-widget>` tag in your page markup. At minimum, you need the `public-key` attribute:

```html theme={null}
<scentbot-widget
  public-key="your_public_key"
  language="en"
></scentbot-widget>
```

### Typical setup

A common configuration includes user identification, positioning, and notification preferences:

```html theme={null}
<scentbot-widget
  public-key="your_public_key"
  language="en"
  user-id="logged_in_user_id"
  position="bottom-right"
  notifications="popup"
></scentbot-widget>
```

### Full page example

```html theme={null}
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>My Store</title>

  <!-- ScentBot fonts -->
  <style>
    @font-face {
      font-family: "Graphik";
      src: url("/fonts/Graphik-Regular.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
    }
    @font-face {
      font-family: "Dover Serif";
      src: url("/fonts/DoverSerif-Regular.woff2") format("woff2");
      font-weight: 400;
      font-style: normal;
    }
  </style>

  <!-- ScentBot script -->
  <script src="https://scentbot.widgets.scentxp.net/index.iife.js" type="application/javascript"></script>
</head>
<body>
  <!-- Your page content -->

  <!-- ScentBot widget -->
  <scentbot-widget
    public-key="your_public_key"
    language="en"
    position="bottom-right"
    notifications="popup"
  ></scentbot-widget>
</body>
</html>
```

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/scentbot/configuration">
    All widget attributes — required and optional.
  </Card>

  <Card title="Events" icon="bolt" href="/scentbot/events">
    Listen for cart events and control the widget programmatically.
  </Card>
</CardGroup>
