# MAU Limit Reached

Jimo tracks **monthly active users (MAU)** for your project. When your project has reached its MAU quota, the **preload** step (the small invader script that runs before the main bundle) receives a `MAU_LIMIT_REACHED` response from the server. In that case, **the main SDK script is not loaded** on purpose: the widget does not initialize, and no in-app experiences run.

Because the full SDK never loads:

* `window.jimo` remains the initial command queue (array) and is not replaced by the live SDK.
* The `JIMO_READY` event is **not** dispatched (that event is emitted only after the main bundle initializes).

So relying on the usual “SDK ready” signals is not enough when the block happens at preload time. The preload script exposes a **small, explicit API on `window`** plus a **DOM-style event** so your application can detect the MAU limit and react correctly to it.

## How to know the MAU limit was reached

You can use any of the following. Prefer the **event** if you need a reliable moment after the preload response is known (race-free with respect to your own early scripts).

### 1. Listen for the `jimo:mau-limit-reached` event (recommended)

The preload script dispatches a `CustomEvent` on `window` when the MAU limit applies:

```javascript
window.addEventListener('jimo:mau-limit-reached', () => {
  // e.g. show in-app notice, redirect to upgrade, track a product event
});
```

Register this listener as early as possible (for example right after your Jimo snippet or in your app bootstrap) so you do not miss the event if preload resolves quickly.

### 2. Read the `JIMO_MAU_LIMIT_REACHED` flag

When the MAU limit is confirmed, the preload script sets:

```javascript
window.JIMO_MAU_LIMIT_REACHED === true
```

If the property is missing or not strictly `true`, either the limit was not hit or preload has not finished yet. For that reason, pairing this with the event above is usually clearer than polling.

### 3. Call `jimoIsMauLimitReached()`

The preload script assigns a helper on `window`:

```javascript
typeof window.jimoIsMauLimitReached === 'function' &&
  window.jimoIsMauLimitReached() === true
```

This function is only set when the MAU branch runs; it returns whether the MAU limit flag is set. Use it if you prefer a callable check at a specific point in your code (for example after other async work).

### 4. Browser console

The preload script still logs an informational message when the MAU limit blocks loading, including a link to the Jimo app. This is useful for debugging but is not a programmatic integration surface for production apps.

## What to do next

Quota and billing options are managed in the Jimo product. Visit [https://i.usejimo.com](https://i.usejimo.com/) to review your project’s usage and upgrade paths.

## Summary

| Signal                                   | Use case                                                          |
| ---------------------------------------- | ----------------------------------------------------------------- |
| `jimo:mau-limit-reached` on `window`     | React as soon as preload knows MAU blocked loading (recommended). |
| `window.JIMO_MAU_LIMIT_REACHED === true` | Simple boolean check when you know preload has completed.         |
| `window.jimoIsMauLimitReached()`         | Explicit function call where you already branch on callable APIs. |

None of these replace the full Jimo SDK: if the MAU limit is reached, the main bundle is not loaded until the situation is resolved on the product side.
