CleverTap helps you track mobile app installations via Adjust.
After your app has been installed from an Adjust media source, you can retrieve the install data using the Adjust SDK in your app, and let CleverTap know about the installation source, medium, and campaign.
Once you integrate Adjust and CleverTap as shown below, the install attribution data will show up in the specific Campaign Dashboard.
The Adjust SDK must be separately integrated in your app
Android Integration
In your first activity, add the below listed code before you initialize the Adjust SDK (before the line Adjust.onCreate(config);)
String appToken = "{ADJUST_APP_TOKEN}";
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
AdjustConfig config = new AdjustConfig(this, appToken, environment);
config.setOnAttributionChangedListener(new OnAttributionChangedListener() {
public void onAttributionChanged(AdjustAttribution attribution) {
String source = attribution.network;
String medium = attribution.trackerName;
String campaign = attribution.campaign;
cleverTap.pushInstallReferrer(source, medium, campaign);
}
});
Adjust.onCreate(config);
iOS Integration
Update your app delegate’s interface declaration to include the AdjustDelegate protocol.
@interface AppDelegate : UIResponder <UIApplicationDelegate, AdjustDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
Implement the method adjustAttributionChanged: in your app delegate.
- (void) adjustAttributionChanged:(ADJAttribution *)attribution {
NSString *campaign = attribution.campaign;
NSString *source = attribution.network;
NSString *medium = attribution.trackerName;
[CleverTap pushInstallReferrer source:source medium:medium campaign:campaign];
}
Update your application:didfinishlaunchingwithoptions: to set the Adjust delegate.
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *) launchOptions {
...
NSString *yourAppToken = @"{ADJUST_APP_TOKEN}";
NSString *environment = ADJEnvironmentProduction;
ADJConfig *adjustConfig = [ADJConfig configWithAppToken:yourAppToken
environment:environment];
[adjustConfig setDelegate:self];
[Adjust appDidLaunch:adjustConfig];
...
return YES;
}
Updated 10 months ago