Download EMMA SDK Cordova/Ionic

1. Add EMMA SDK into your project:

<script src="https://in.emma.io/develKits/MobileWeb/EMMA-SDK-Cordova-2.1.min.js" type="text/javascript"></script>

2. Add the following dependences:

  • jQuery (v1.11 o superior).
  • Google Maps (for enabling trackLocation.

In order to launch advertising campaigns, it is necessary to pass to the SDK the advertising identifier of the devices. Follow the following steps:

  1. Add plugin to the app:
    cordova plugin add https://github.com/EMMADevelopment/cordova-plugin-android-idfa.git
  2. Add the following code into the app start up (caso iOS):
    var EMMA: any = window["EMMA"];
    var deviceAdId = window["androidIDFA"];
    
    deviceAdId.getAdInfo((sucess){
         EMMA.startSession("YOUR_SESSION_KEY", sucess.idfa);
    });

For more information about integration visit EMMA HTML SDK.

Sample for integration in Ionic/Cordova project : https://github.com/EMMADevelopment/EMMASampleIonic2.git

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.