Countly Destination

On this page

Destination Info
Connection Modes
Device-mode Cloud-mode
Web Web
Mobile Mobile
Server Server

The Countly destination source code for iOS and Android is available on GitHub.

Getting Started

To get started with Countly and Segment, add the iOS, Android or 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.

React Native set up

To add the Countly device-mode SDK to a React Native project using Segment’s 1.5.1≤ release:

  1. Navigate to the root folder of your project, and run a yarn add @segment/analytics-react-native-countly command to add the destination SDK to your project.
  2. Add an import statement to your project, as in the example below.
    import Countly from '@segment/analytics-react-native-countly'
  3. In the same project file, add the destination to the using list in the await command.
    await analytics.setup('YOUR_WRITE_KEY', {
      // Add any of your Device-mode destinations. This ensures they load before continuing.
      using: Countly
      // ...
  4. Finally, change to your iOS development folder ( cd ios ) and run pod install.


Countly helps you better understand your user’s behavior. To accomplish that, track your user’s actions in detail.

When you call track from the iOS or Android library, Segment records an event with Countly. track takes the name of the event and any optional properties you want to associate with the event.

Custom Events

Make a 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.


It’s easy to track revenue in Countly through Segment. Use the track method with a property labeled revenue. The value must be a number.


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

Setting Description
App Key
string. You can find your App Key on your Countly server. It should be 40 characters long, and look something like this: c801156663bfcc4694aafc0dd26023a6d9b9544a.
Server URL
string. You’ll need to add your own Countly Server URL here.

This page was last modified: 08 Mar 2022

Get started with Segment

Segment is the easiest way to integrate your websites & mobile apps data to over 300 analytics and growth tools.
Create free account