Implementation Overview
This guide covers setting up Countly for web, mobile, and desktop applications. Choose your platform and follow the implementation steps.
Quick Start
1. Get Your Credentials
Cloud Users:
Self-Hosted:
- Access your Countly dashboard
- Go to Management → Applications
- Create or select your application
- Note the App Key (server URL is your Countly domain)
2. Install the SDK
Web:
<script type="text/javascript" src="https://cdn.count.ly/countly.min.js"></script>
npm:
npm install countly-sdk-web
Mobile:
# iOS (CocoaPods)
pod 'Countly'
# Android (Gradle)
implementation 'ly.count.android:sdk:23.+'
3. Initialize
Countly.init({
app_key: 'YOUR_APP_KEY',
url: 'https://your-countly-server.com'
});
Countly.track_sessions();
Detailed Guides
- Install SDK - Platform-specific installation
- Event Tracking Setup - Configure custom events
- Data Layer Setup - User properties and data
- Cross-Domain Tracking - Multi-domain setups
- Server-Side vs Client-Side - Implementation approaches
Platform Options
Cloud (Recommended for Quick Start)
- Managed infrastructure
- Automatic updates
- No server maintenance
- Sign up at count.ly
Self-Hosted
For complete data control:
# Docker installation
wget -qO- https://c.ly/install | bash
Or manual installation following official documentation.
Verification
After installation:
- Open your application
- Check Countly dashboard → Real-time
- Verify session appears
- Test an event:
Countly.add_event({ key: 'test_event', count: 1 });
- Confirm event appears in Events section