npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@global66/nativescript-plugin-appsflyer

v2.0.6

Published

Appsflyer SDK for NativeScript applications

Downloads

11

Readme

appsflyer-nativescript-plugin

Nativescript Library for AppsFlyer SDK

npm version

Table of content

This plugin is built for

  • iOS AppsFlyerSDK v6.12.0
  • Android AppsFlyerSDK v6.12.1

Breaking Changes

v6.5.4

Android: deepLinkResult will return an object instead of a string

Installation

$ tns plugin add nativescript-plugin-appsflyer

Integration


Call module by adding (native javascript):

var appsFlyer = require("nativescript-plugin-appsflyer");


appsFlyer.initSdk(options, callback): void

initializes the SDK.

| parameter | type | description | | ----------- |-----------------------------|--------------| | options | Object | SDK configuration |

options

| name | type | default | description | | -----------|---------|---------|------------------------| | devKey |string | | Appsflyer Dev key | | appId |string | | Apple Application ID (for iOS only) | | isDebug |boolean| false | debug mode (optional)| | onConversionDataSuccess |function| | AppsFlyer allows you to access the user attribution data in real-time for every new install, directly from the SDK level. By doing this you can serve users with personalized content or send them to specific activities within the app, which can greatly enhance their engagement with your app. For Android; for iOS | | onConversionDataFailure |function| | |

Example:

 var options = {
            devKey:  'WdpTVAcYwmxsaQ4WeTspmh',
            appId: "975313579",
            isDebug: true,
            timeToWaitForATTUserAuthorization: 60,
            onConversionDataSuccess: function(_res){
                console.log(JSON.stringify(_res));
            },
            onConversionDataFailure: function(_res){
                console.warn("failure: " + JSON.stringify(_res));
            },
        };

        appsFlyer.initSdk(options).then(function(result) {
            viewModel.set("initSdkResponse", result.status);
        }, function(err) {
            viewModel.set("initSdkResponse", JSON.stringify(err));
        });

appsFlyer.logEvent(options): Promise<any>
  • These in-app events help you measure how loyal users discover your app, and attribute them to specific campaigns/media-sources. Please take the time define the event/s you want to measure to allow you to measure the ROI (Return on Investment) and LTV (Lifetime Value).
  • The logEvent method allows you to send in-app events to AppsFlyer analytics. This method allows you to add events dynamically by adding them directly to the application code.

| parameter | type | description | | ----------- |-----------------------------|--------------| | options | Object | log event configuration |

options

| parameter | type | description | | ----------- |-----------------------------|--------------| | eventName | string | custom event name, is presented in your dashboard. See the Event list HERE | | eventValues | Object | event details (see example bellow) |

Example: (native javascript)

 
        var options = {
            eventName: "af_add_to_cart",
            eventValues: {
                "af_content_id": "id123",
                "af_currency": "USD",
                "af_revenue": "2"
            }
        };
        appsFlyer.logEvent(options).then(function(result) {
            viewModel.set("logEventResponse", result);
        }, function(err) {
            viewModel.set("logEventResponse", JSON.stringify(err));
        });
    
    

Demo

This plugin has a demo project bundled with it. To give it a try , clone this repo and from root a.e. nativescript-plugin-appsflyer execute the following:

npm run setup
  • Run npm run demo.ios or npm run demo.android will run for the appropriate platform.