> For the complete documentation index, see [llms.txt](https://docs.optibase.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optibase.io/integrations/amplitude.md).

# Amplitude

### Setup

Unlike some integrations, Amplitude requires a one-time connection in your Optibase dashboard.

1. Go to your Optibase dashboard → **Settings** → **Integrations**
2. Find the Amplitude section and click **Connect**
3. Select your region — **United States (US)** or **Europe (EU)**. This must match the region of your Amplitude project.
4. Paste your **Amplitude API key**. You can find it in Amplitude → Settings → Projects → your project → General
5. Click **Connect**. Optibase will verify the key before saving.

{% hint style="info" %}
**Note:** This integration is available on paid plans only.
{% endhint %}

### Testing the Connection

Once connected, you can verify the integration is working by clicking Test Connection in the Amplitude integration settings. This sends a test event to your Amplitude project. You should see an event named `optibase_connection_test` appear in Amplitude under your project's event stream shortly after.

### Adding Amplitude to Your Page

Include the Amplitude browser SDK on your page **before** the Optibase script:

```html
<script src="https://cdn.amplitude.com/libs/analytics-browser-2.0.0-min.js.gz"></script>
<script>
  window.amplitude.init('YOUR_AMPLITUDE_API_KEY', {
    defaultTracking: true,
    serverUrl: 'https://api.eu.amplitude.com/2/httpapi' // use https://api2.amplitude.com/2/httpapi for US
  });
</script>

<!-- Optibase script must come after -->
```

Replace `YOUR_AMPLITUDE_API_KEY` with your Amplitude project API key and set the `serverUrl` to match your region.

### Event Details

#### optibase\_variant\_shown

When a variant is assigned to a visitor, Optibase sends an event named `optibase_variant_shown` to Amplitude with the following properties:

| Property    | Description        |
| ----------- | ------------------ |
| `testId`    | ID of the A/B test |
| `variantId` | Assigned variant   |

#### optibase\_conversion\_triggered

Sent when a visitor triggers a conversion event.

| Property       | Description                                     |
| -------------- | ----------------------------------------------- |
| `conversionId` | The ID of the conversion as defined in Optibase |

***

### Analytics Setup

Once events are flowing into Amplitude, they can be used across Event Segmentation, Funnel Analysis, and User Lookup. A typical starting point is using `optibase_variant_shown` as a segmentation filter to isolate visitors by experiment and variant, then layering in `optibase_conversion_triggered` or any of your own events to measure downstream behaviour.
