# Countly 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 **Countly** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

### Components

* [iOS](https://github.com/segment-integrations/analytics-ios-integration-countly)
* [Android](https://github.com/segment-integrations/analytics-android-integration-countly)

## Connection Modes

[Learn more about connection modes.](/docs/segment/connections/destinations/#connection-modes)

### Device-Mode

* web: no
* mobile: yes
* server: no

### Cloud-Mode

* web: no
* mobile: no
* server: no

The Countly destination source code for [iOS](https://github.com/Countly/countly-sdk-ios) and [Android](https://github.com/Countly/countly-sdk-android) is available on GitHub.

## Getting Started

To get started with Countly and Segment, add the [iOS](/docs/segment/connections/sources/catalog/libraries/mobile/ios/), [Android](/docs/segment/connections/sources/catalog/libraries/mobile/android/) or [React Native](/docs/segment/connections/sources/catalog/libraries/mobile/react-native/) libraries to your mobile app.

After you integrate the appropriate destination with your app, add the Countly destination from the destination catalog, and add your application's **App Key** and **Server URL** which you can find on the Countly Application Management screen.

These new settings take up to an hour to propagate to existing users, but is instantaneous for new users.

## Track

Countly helps you better understand your user's behavior. To accomplish that, [`track`](/docs/segment/connections/spec/track/) your user's actions in detail.

When you call [`track`](/docs/segment/connections/spec/track/) from the iOS or Android library, Segment records an event with Countly. [`track`](/docs/segment/connections/spec/track/) takes the name of the event and any optional `properties` you want to associate with the event.

### Custom Events

Make a [`track`](/docs/segment/connections/spec/track/) call to send a custom event to Countly. The event name maps to the Countly "key" and "count" is set to 1. Segment passes properties you add to the event to Countly.

### Revenue

It's easy to track revenue in Countly through Segment. Use the [`track`](/docs/segment/connections/spec/track/) method with a property labeled `revenue`. The value must be a number.

## Settings

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

| Field      | Description                                                                                                                                                    | Required | Type   |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------ |
| App Key    | You can find your App Key on your Countly server. It should be 40 characters long, and look something like this: \`c801156663bfcc4694aafc0dd26023a6d9b9544a\`. | Yes      | string |
| Server URL | You'll need to add your own Countly Server URL here.                                                                                                           | Yes      | string |
