# Not plugged in

Learn how to properly initialize the SDK.

If you call any method before calling the [`plug`](/reference/sdk/javascript/api/plug/plug) method, you will get the error below:

> **Error**
>
> Croct is not plugged in.

To avoid this, ensure you call the [`plug`](/reference/sdk/javascript/api/plug/plug) method at the start of your application, before invoking any other methods.

For most applications, the best place to call initialize the SDK is in the [content loaded event](https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event) or in the `<head>` tag of your HTML document.

See the [Installation page](/reference/sdk/javascript/integration#initialize) for more information on how to initialize the SDK.
