GithubHelp home page GithubHelp logo

rarago / cordova-plugin-appsflyer-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from appsflyersdk/appsflyer-cordova-plugin

0.0 0.0 0.0 20.18 MB

AppsFlyer plugin for Cordova

License: MIT License

Java 26.52% Objective-C 56.31% JavaScript 17.17%

cordova-plugin-appsflyer-sdk's Introduction

Cordova AppsFlyer plugin for Android and iOS.

npm version Build Status


❗️Important
Cordova AppsFlyer plugin version 4.4.0 and higher are meant to be used with [email protected]
For lower versions of cordova-android please use plugin version 4.3.3 available @ https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/tree/4.3.3


🛠 In order for us to provide optimal support, we would kindly ask you to submit any issues to [email protected]

When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , reproduction steps, code snippets, logs, and any additional relevant information.


Table of content

  • iOS AppsFlyerSDK v4.9.0
  • Android AppsFlyerSDK v4.9.0
$ cordova plugin add cordova-plugin-appsflyer-sdk

To install cordova manually check out the doc here.

NOTE: for Ionic installation see this section

Great installation and setup guides can be viewed here.

Set your App_ID (iOS only), Dev_Key and enable AppsFlyer 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 AppsFlyer.
appId - For iOS only. Your iTunes Application ID.

Add the following lines to your code to be able to initialize tracking with your own AppsFlyer dev key:

document.addEventListener('deviceready', function() {

   window.plugins.appsFlyer.initSdk({
      devKey: 'K2***************99', // your AppsFlyer devKey
      isDebug: false,
      appId: '41*****44' // your ios appID
    },
      (result) => {
        console.log(result);
      },
      (error) => {
        console.error(error);
      }
    );
  
}, false);

See the full API available for this plugin.

Check out the demo for this project here.

In case you are using Ionic framework, you have 2 options: 1 - Using Ionic native plugin run this commands:

$ ionic cordova plugin add cordova-plugin-appsflyer-sdk
$ npm install @ionic-native/appsflyer

add the following to app.module.ts

import { Appsflyer } from "@ionic-native/appsflyer/ngx";
...
providers: [
    Appsflyer,
  	...,
]

and in your main ts file:

import { Appsflyer } from '@ionic-native/appsflyer/ngx';


constructor(private appsflyer: Appsflyer) { }

...

this.appsflyer.initSdk(options);
  1. You can use the plugin the same way like in Cordova with only one exception: instead of window.plugins... use window['plugins']...

Check out the full API for more information

cordova-plugin-appsflyer-sdk's People

Contributors

af-fess avatar benjaminaf avatar wesfieldj avatar shachar-af avatar shaharaf avatar shaharc1990 avatar sokoloff06 avatar af-dan avatar gonzaloserrano avatar dasmajo avatar rarago avatar sebaferreras avatar v19i avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.