# Kameleoon (Actions) Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Actions Kameleoon**, **Kameleoon (Actions)** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.
* This destination is **Beta.**

[Kameleoon](https://www.kameleoon.com/en?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is a versatile optimization, experimentation, and personalization platform. It is used to enhance website and mobile app experiences while enabling experimentation.

This destination is maintained by Kameleoon. For any issues with the destination, [contact the Kameleoon Support team](mailto:support@kameleoon.com).

## Benefits of Kameleoon (Actions) vs Kameleoon Classic

Kameleoon (Actions) provides the following benefits over the classic Kameleoon destination:

* **Event Flexibility**. Tailor your events precisely by leveraging Segment's event filters, allowing for more granular control over the data you receive in Kameleoon.
* **Attribute Mapping**. Seamlessly map attributes before forwarding events, ensuring a smooth integration process and accurate representation of your data in Kameleoon.
* **Monitoring Capabilities**. Take advantage of Segment's monitoring tools to keep a vigilant eye on your operations, providing valuable insights and ensuring a seamless data flow into Kameleoon.

## Getting started

1. Navigate to **Connections > Catalog** in the Segment web app.
2. Search for *Kameleoon (Actions)* and select the destination.
3. Click **Add destination**.
4. Select the Source you want to connect to Kameleoon (Actions) and click **Confirm Source**.
5. On the **Basic Settings** side panel, complete the required fields:
   * **Name**: Enter a name to help you identify this destination in Segment
   * **API Key**: Paste your Kameleoon API key. To generate an API Key, see [Kameleoon's documentation on generating an API key](https://help.kameleoon.com/setting-up-segment-destination-actions/#Kameleoon_setup).
   * **Sitecode**: Paste your Kameleoon project sitecode. You can find it in the [project dashboard](https://help.kameleoon.com/question/how-do-i-find-my-site-id/).
6. Enable the destination by clicking the **Enable Destination** toggle switch.
7. Click **Save Changes**.

## Destination Settings

| Field    | Description                                                                                                                      | Required | Type     |
| -------- | -------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Key  | Kameleoon API key. You can generate one using the link in the help doc (https://help.kameleoon.com/setting-up-segment/).         | Yes      | password |
| Sitecode | Kameleoon project sitecode. You can find this project dashboard (https://help.kameleoon.com/question/how-do-i-find-my-site-id/). | Yes      | string   |

## Available Presets

Kameleoon (Actions) has the following presets

| Preset Name    | Trigger                 | Default Action |
| -------------- | ----------------------- | -------------- |
| Track Calls    | Event type = "track"    | Log Event      |
| Page Calls     | Event type = "page"     | Page Event     |
| Group Calls    | Event type = "group"    | Group Event    |
| Identify Calls | Event type = "identify" | Identify Event |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Kameleoon-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Log Event](#log-event)
* [Identify Event](#identify-event)
* [Page Event](#page-event-1)
* [Group Event](#group-event)

### Log Event

Send a track event to Kameleoon

Log Event is a **Cloud** action. The default Trigger is `type = "track"`

| Field                           | Description                                                       | Required | Type   |
| ------------------------------- | ----------------------------------------------------------------- | -------- | ------ |
| Anonymous ID                    | Anonymous id                                                      | No       | STRING |
| User ID                         | The ID associated with the user                                   | No       | STRING |
| Event Name                      | The event name                                                    | No       | STRING |
| Type                            | The type of the event                                             | Yes      | STRING |
| Event properties or user traits | Additional event Properties or user Traits to send with the event | No       | OBJECT |
| Kameleoon Visitor Code          | Kameleoon Visitor Code - a unique identifier for the user         | No       | STRING |
| Timestamp                       | The timestamp of the event                                        | Yes      | STRING |
| Context properties              | Context properties to send with the event                         | No       | OBJECT |
| MessageId                       | The Segment messageId                                             | Yes      | STRING |

### Identify Event

Send user traits to Kameleoon

Identify Event is a **Cloud** action. The default Trigger is `type = "identify"`

| Field                  | Description                                               | Required | Type   |
| ---------------------- | --------------------------------------------------------- | -------- | ------ |
| Anonymous ID           | Anonymous id                                              | No       | STRING |
| User ID                | The ID associated with the user                           | No       | STRING |
| Type                   | The type of the event                                     | Yes      | STRING |
| User Traits            | Traits to send with the event                             | No       | OBJECT |
| Kameleoon Visitor Code | Kameleoon Visitor Code - a unique identifier for the user | No       | STRING |
| Timestamp              | The timestamp of the event                                | Yes      | STRING |
| MessageId              | The Segment messageId                                     | Yes      | STRING |

### Page Event

Send a page event to Kameleoon

Page Event is a **Cloud** action. The default Trigger is `type = "page"`

| Field                  | Description                                               | Required | Type   |
| ---------------------- | --------------------------------------------------------- | -------- | ------ |
| Anonymous ID           | Anonymous id                                              | No       | STRING |
| User ID                | The ID associated with the user                           | No       | STRING |
| Type                   | The type of the event                                     | Yes      | STRING |
| Properties             | Page properties                                           | No       | OBJECT |
| Kameleoon Visitor Code | Kameleoon Visitor Code - a unique identifier for the user | No       | STRING |
| Page Name              | The name of the page                                      | No       | STRING |
| Context properties     | Context properties to send with the event                 | No       | OBJECT |
| Timestamp              | The timestamp of the event                                | Yes      | STRING |
| MessageId              | The Segment messageId                                     | No       | STRING |

### Group Event

Send group traits to Kameleoon

Group Event is a **Cloud** action. The default Trigger is `type = "group"`

| Field                  | Description                                               | Required | Type   |
| ---------------------- | --------------------------------------------------------- | -------- | ------ |
| Anonymous ID           | Anonymous id                                              | No       | STRING |
| User ID                | The ID associated with the user                           | No       | STRING |
| Type                   | The type of the event                                     | Yes      | STRING |
| Group ID               | The group id                                              | Yes      | STRING |
| User Traits            | Traits to send with the event                             | No       | OBJECT |
| Kameleoon Visitor Code | Kameleoon Visitor Code - a unique identifier for the user | No       | STRING |
| Timestamp              | The timestamp of the event                                | Yes      | STRING |
| MessageId              | The Segment messageId                                     | Yes      | STRING |

The integration requires that you use the same system of identifiers for both tools. While Segment uses the userId, Kameleoon uses the kameleoonVisitorCode. In order to identify which visitor triggered the forwarded Segment events, you must include the kameleoonVisitorCode inside your Segment events. To know more, see [Kameleoon's documentation on matching a Segment user with a Kameleoon visitor](https://help.kameleoon.com/setting-up-segment-destination-actions/#Matching_an_Segmentio_user_with_a_Kameleoon_visitor).

## Migration from the classic Kameleoon destination

To migrate from the classic Kameleoon destination:

1. Include the `kameleoonVisitorCode` in your Segment events for accurate visitor tracking. To know more, see [Kameleoon's documentation on matching a Segment user with a Kameleoon visitor](https://help.kameleoon.com/setting-up-segment-destination-actions/#Matching_an_Segmentio_user_with_a_Kameleoon_visitor).
2. Define mapping and filters on the destination configuration page.
3. Test events to ensure accurate goal creation and conversion tracking.
4. Activate the Kameleoon (Actions) destination when everything is ready and tested.
5. Deactivate the classic Kameleoon destination.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Kameleoon (Actions)  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field    | Description                                                                                                                      | Required | Type     |
| -------- | -------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| API Key  | Kameleoon API key. You can generate one using the link in the help doc (https://help.kameleoon.com/setting-up-segment/).         | Yes      | password |
| Sitecode | Kameleoon project sitecode. You can find this project dashboard (https://help.kameleoon.com/question/how-do-i-find-my-site-id/). | Yes      | string   |
