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

# Mintlify Integration

> How to integrate bchic Analytics into your Mintlify documentation.

Since Mintlify currently does not offer a native plugin integration, we embed the tracking via a small, custom script. This is done in just a few minutes.

<Steps>
  <Step title="Retrieve Website ID">
    First, you need the **Website ID** of your documentation from your bchic Dashboard.

    1. Open **Settings** (gear icon bottom left).
    2. Navigate to the **Organization** menu item.
    3. Open the "Linked Website URLs" area via the arrow icon.

    <img src="https://mintcdn.com/bchic/bC-FpAMa04VldK7d/images/integration/mintlify/step1.jpeg?fit=max&auto=format&n=bC-FpAMa04VldK7d&q=85&s=711f62981c650e4bedbb00cd1e407e97" alt="Settings Organization Dashboard" width="1920" height="1080" data-path="images/integration/mintlify/step1.jpeg" />

    Now add the URL of your documentation here (e.g., `docs.your-company.com`) and click on the plus symbol:

    <img src="https://mintcdn.com/bchic/bC-FpAMa04VldK7d/images/integration/mintlify/step2.jpeg?fit=max&auto=format&n=bC-FpAMa04VldK7d&q=85&s=908baf6a63762582a658c6977b1ef6c0" alt="Add URL to Organization" width="1920" height="1080" data-path="images/integration/mintlify/step2.jpeg" />

    Then click on the **Installation Button** (the code icon) next to the newly created URL. Copy your ID from the displayed code snippet. You can find it in the `data-website-id` attribute.

    <img src="https://mintcdn.com/bchic/bC-FpAMa04VldK7d/images/integration/mintlify/step3.jpeg?fit=max&auto=format&n=bC-FpAMa04VldK7d&q=85&s=f973a9819bc01da506bbe3139ab62807" alt="Copy Website ID" width="1920" height="1080" data-path="images/integration/mintlify/step3.jpeg" />
  </Step>

  <Step title="Create Tracking File">
    Now create a new file in your documentation project. We recommend saving this in the root directory (where your `docs.json` is located).

    Name the file: `bchic.js`

    Paste the following code into this file. **Important:** Replace `YOUR-ID-HERE` with the ID you copied in the first step.

    ```javascript bchic.js theme={null}
    (function() {
    // Create a new script element
    var script = document.createElement('script');

    // Set the source and defer attributes
    script.src = 'https://analytics.bchic.de/script.js';
    script.defer = true;

    // Set your custom data-website-id attribute
    script.setAttribute('data-website-id', 'YOUR-ID-HERE');

    // Append the script to the head of the document to start loading it
    document.head.appendChild(script);
    })();
    ```
  </Step>
</Steps>

## Verification

Once you have pushed these changes, the script will automatically load on all pages of your documentation. You can verify the installation by visiting your docs and checking the bchic Dashboard to see if the first visitor (yourself) is being tracked.
