# Integration

Learn how to integrate Croct into your JavaScript project.

The fastest way to get started is through our [CLI](/reference/cli/installation). If you prefer to set it up manually, check out the [step-by-step instructions](/reference/sdk/javascript/manual-installation).

## Run the command \[#install]

The recommended way to install the SDK is to use the Croct CLI.

**Command to initialize your project**

```sh
croct init
```

## Initialize the provider \[#initialize]

To initialize the SDK, use the following code snippet:

**JavaScript**

```ts
import croct from '@croct/plug';

croct.plug({
  appId: 'APPLICATION_ID'
});
```

**TypeScript**

```ts
import croct from '@croct/plug';

croct.plug({
  appId: 'APPLICATION_ID'
});
```

**HTML**

```html
<!DOCTYPE html>
<html>
<head>
    <title>My awesome application</title>
    <script src="https://cdn.croct.io/js/v1/lib/plug.js"></script>
    <script>
      croct.plug({appId: 'APPLICATION_ID'});
    </script>
</head>
<body>
<!-- ... -->
</body>
</html>
```

You can find the Application ID on the [Integration page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/integration) of your application. For a list of all available options, refer to the [`plug`](api/plug/plug) documentation.

## Check your integration \[#check]

If you open your application now, it should start sending events.

To check if your integration is working, go to the [Integration page](https://app.croct.com/redirect/organizations/-organization-/workspaces/-workspace-/applications/-application-/integration) of your application.

![Integration status](/assets/reference/sdk/integration-status.png)

When working correctly, you should see a green bullet next to the **Status** label saying **"Received traffic in the past 24 hours"**. If you still do not see this message after a few minutes, see the [Troubleshooting](troubleshooting) reference.

## Explore

- [JavaScript SDK](https://github.com/croct-tech/plug-js): Explore and contribute to the SDK development on GitHub.
- [Troubleshooting](troubleshooting): Identify and resolve issues with your integration.
