> For the complete documentation index, see [llms.txt](https://docs.edgetag.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgetag.io/channels/active-campaign/onboarding.md).

# Onboarding

The ActiveCampaign integration connects your website events to your ActiveCampaign account through a simple, credential-based setup. Let's walk through the process.

### Video Guide

{% embed url="<https://www.loom.com/share/b3f78d52a865445a8ff55c5042c67ec6?sid=39baa812-5cd2-4016-889d-2e0758509929>" %}

### Authorization

To add a channel, begin by entering the channel's name. We recommend choosing a name that clearly describes the purpose of the integration. This will assist with debugging if any issue arises.\
\
Now we need to add the Account ID. Let's go to the [ActiveCampaign dashboard](https://www.activecampaign.com/) and navigate to "Website", "Site Tracking", and look at the **Tracking Code** section. From this section, we get the Account ID associated with the ActiveCampaign account.

<figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2F0xfjmyBI4YlctJ93R6ze%2FActiveCampaign%20Account%20ID.png?alt=media&amp;token=1ab7a5e2-b138-4b28-9357-3e8d90fe29d7" alt=""><figcaption></figcaption></figure>

The next step is to look at the **Event Tracking** section. We need to do 2 things here

1. Toggle the status to be **ON**
2. Get the Event key

<figure><img src="https://1474399258-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZJWZKbUk0hRISkCIj2p4%2Fuploads%2FYoKxHE40wbfIKpfYDmfU%2FActiveCampaign%20Event%20Key.png?alt=media&amp;token=15b22b1e-e3c7-471b-938b-8e3f97001b0c" alt=""><figcaption></figcaption></figure>

Use the Account ID and Event Key from ActiveCampaign and update the configuration.

Click "Save & Deploy". Congratulations, the setup is now complete.

### Custom Objects Setup (optional)

If you prefer events to be stored as Custom Object records instead of the contacts' Events feed, three additional settings are needed: **Account Name**, **API Key**, and **Schema ID**.

**Account Name and API Key**

In your ActiveCampaign dashboard, navigate to "Settings", then "Developer". The **URL** field shows your API endpoint, e.g. `https://myaccount.api-us1.com` — the Account Name is the subdomain part (`myaccount`). Copy the **Key** field as the API Key.

**Create the Custom Object schema**

The channel writes records using a fixed field structure, so the schema must be created with exactly these properties:

* A text field with the ID `event-name` — receives the event name (e.g. `Purchase`)
* A text field with the ID `event-data` — receives the event payload as JSON
* A relationship to Contacts named `primary-contact`

The schema can be created via the [ActiveCampaign API](https://developers.activecampaign.com/reference/create-a-schema). Example request:

```json
POST https://{youraccountname}.api-us1.com/api/3/customObjects/schemas
Api-Token: {your API key}

{
  "schema": {
    "slug": "edgetag-events",
    "labels": { "singular": "Event", "plural": "Events" },
    "fields": [
      {
        "id": "event-name",
        "labels": { "singular": "Event Name", "plural": "Event Names" },
        "type": "text",
        "required": true
      },
      {
        "id": "event-data",
        "labels": { "singular": "Event Data", "plural": "Event Data" },
        "type": "text"
      }
    ],
    "relationships": [
      {
        "id": "primary-contact",
        "labels": { "singular": "Contact", "plural": "Contacts" },
        "namespace": "contacts",
        "hasMany": false
      }
    ]
  }
}
```

The response contains the schema ID — use it as the Schema ID in the channel configuration.

{% hint style="warning" %}
Custom Objects require an ActiveCampaign Enterprise plan. If Account Name, API Key, or Schema ID is left empty, events are sent to the Events feed as usual.
{% endhint %}

Enter all three values in the channel configuration and click "Save & Deploy". Events will now be written as Custom Object records, each linked to the matching contact (created automatically if it doesn't exist).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.edgetag.io/channels/active-campaign/onboarding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
