Journify Flutter CleverTap Plugin
A Journify destination plugin for CleverTap analytics integration.
Features
- π Seamless CleverTap integration with Journify Analytics
- π€ User identification and profile management
- π Event tracking
- π± Screen view tracking
- πΊοΈ Automatic field mapping
- β‘ Optimized for performance
Installation
Add this to your package's pubspec.yaml
file:
dependencies:
journify_flutter_plugin_clevertap: ^1.0.0
Requirements
- Flutter SDK: >=3.2.0 <4.0.0
- iOS: iOS 11 or higher
- Android: minSdkVersion 21 or higher
Setup
iOS Setup
- Add the following to your
ios/Podfile
:
target 'Runner' do
use_frameworks!
pod 'CleverTapSDK'
end
- Update your
ios/Runner/Info.plist
:
<key>CleverTapAccountID</key>
<string>YOUR-ACCOUNT-ID</string>
<key>CleverTapToken</key>
<string>YOUR-ACCOUNT-TOKEN</string>
Android Setup
- Add to your
android/app/build.gradle
:
dependencies {
implementation 'com.clevertap.android:clevertap-android-sdk:4.7.0'
}
- Update your
android/app/src/main/AndroidManifest.xml
:
<application>
<meta-data
android:name="CLEVERTAP_ACCOUNT_ID"
android:value="YOUR-ACCOUNT-ID"/>
<meta-data
android:name="CLEVERTAP_TOKEN"
android:value="YOUR-ACCOUNT-TOKEN"/>
</application>
Usage
Initialize the Plugin
import 'package:journify_flutter/journify.dart';
import 'package:journify_flutter_plugin_clevertap/journify_flutter_plugin_clevertap.dart';
void main() {
// Initialize Journify with CleverTap plugin
Journify.initialize(
writeKey: 'YOUR_WRITE_KEY',
plugins: [ClevertapDestination()],
);
}
Identify Users
await Journify.identify(
userId: 'user123',
traits: {
'name': 'John Doe',
'email': 'john@example.com',
'phone': '+1234567890',
'gender': 'M',
'birthday': '1990-01-01',
},
);
Track Events
await Journify.track(
event: 'Purchase Completed',
properties: {
'product': 'Premium Plan',
'price': 99.99,
'currency': 'USD',
},
);
Record Screen Views
await Journify.screen(
name: 'Product Details',
properties: {
'product_id': '123',
'category': 'Electronics',
},
);
Field Mappings
The plugin automatically maps common profile fields to CleverTap's format:
Journify Field | CleverTap Field |
---|---|
name | Name |
phone | Phone |
birthday | DOB |
gender | Gender |
Gender values are automatically normalized:
- 'M' or 'MALE' β 'M'
- 'F' or 'FEMALE' β 'F'
Error Handling
The plugin includes comprehensive error handling and logging. All operations are wrapped in try-catch blocks with detailed error messages logged through Journify's logging system.
Contributing
We welcome contributions! Please see our contributing guide for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- π Documentation
- π¬ Community Forum
- π Issue Tracker
- π§ Email Support