appcarry-cordova-sdk

1.1.9 • Public • Published

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.

$ cordova plugin add appcarry-cordova-sdk  

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}`);
    }); 

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");

Package Sidebar

Install

npm i appcarry-cordova-sdk

Weekly Downloads

2

Version

1.1.9

License

ISC

Unpacked Size

118 kB

Total Files

16

Last publish

Collaborators

  • appcarry