appcarry-cordova-sdk
v1.1.9
Published
Appcarry SDK for cordova platform. Appcarry Mobile Measurement and Attribution SDK
Downloads
4
Maintainers
Readme
Appcarry Cordova Plugin for Android/iOS.
Appcarry is Mobile Measurement & Attribution platform to analyze the effectiveness of campaigns contributing towards app download or/and installs.
📲Installation
$ cordova plugin add appcarry-cordova-sdk
🚀 Setup
Set your App ID (iOS only), Dev Key and enable Appcarry to detect installations, sessions (app opens) and updates. > This is the minimum requirement to start tracking your app installs and is already implemented in this plugin. You MUST modify this call and provide:
devKey - Your application devKey provided by Appcarry.
appId - For iOS only. Your iTunes Application ID.
waitForATTUserAuthorization - For iOS14 only. Time for the sdk to wait before launch.
Add the following lines to your code to be able to initialize tracking with your own Appcarry dev key:
var appcarryConfiguration = {
devKey: 'Your Dev Key',
appId: 'Your iTunes Application ID',
isDebug: true,
onInstallConversionDataListener: true,
// onDeepLinkListener: true, //if true, will override onAppOpenAttribution
waitForATTUserAuthorization: 10, //--> Here you set the time for the sdk to wait before launch ***For iOS14 only.***
};
window.plugins.AppcarryCordovaPlugin.initSdk(appcarryConfiguration, function (res) {
console.log('GCD ~~>' + res);
alert('GCD ~~>' + res);
}, function (err) {
console.log(`failed ~~> ${err}`);
});
🚀 Track Events
Add the following script to your index.html file:
<script src="js/appcarry/AppcarryEvents.js"></script>
Add the following lines to your code to trigger event tracking with event values:
var values = {
id: '12345678',
amount: '500'
};
window.plugins.AppcarryCordovaPlugin.logEvent(AppcarryEvents.PURCHASE,values, function (res) {
console.log('EVENT ~~>' + res);
}, function (err) {
console.log(`EVENT failed ~~> ${err}`);
});
Add the following lines to your code to trigger Web Hook Events:
window.plugins.AppcarryCordovaPlugin.setWebHookURL("Your Web Hook URL");