# How to configure a connection to RudderStack

To use the **RudderStack** platform with B2CORE and collect data on various events in the B2CORE UI, configure a connection to RudderStack.

{% hint style="info" %}
Before configuring a connection in the Back Office, you must have signed up for RudderStack and have an active account with the configured *sources*, which are places from which event data will be collected, and *destinations*, which are the platforms where you want to send your event data for analytics. You can consult the official [RudderStack documentation](https://www.rudderstack.com/docs/) or contact their support in case you have any questions.
{% endhint %}

To configure a connection in the B2CORE Back Office:

{% stepper %}
{% step %}
Navigate to **System** > **External connections**.
{% endstep %}

{% step %}
Click **+Create** in the upper-right page corner.
{% endstep %}

{% step %}
On the **Create connection** page, fill in the following fields:

* In **Name** field, enter a name that you want to use for the connection.
* In the **Caption** field, enter a caption that will be applied to the platform in the Back Office.
* In the **Provider** dropdown, select **RudderStack**.
  {% endstep %}

{% step %}
Click **Save** to create the connection.
{% endstep %}

{% step %}
Find the newly created connection in the list and click **Edit**.
{% endstep %}

{% step %}
On the **Edit connection** page, fill in the following fields:

* In the **Data Plane URL** field, specify the URL for routing and processing events.
* In the **Write Key** field, specify the unique identifier of your source. RudderStack uses this key to send events from a source to the specified destination.

You can find these parameters on your RudderStack Homepage.

<figure><img src="/files/sBTqULzTd1uBTbw2ansg" alt="RudderStack Homepage"><figcaption><p>RudderStack Homepage</p></figcaption></figure>

* In the **Enabled** dropdown, select **Yes**.
  {% endstep %}

{% step %}
Click **Save** to apply the changes.
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2core.b2broker.com/how-to-articles/manage-system-settings/how-to-configure-a-connection-to-rudderstack.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
