Cordova
Last updated
Last updated
Please have the following handy before beginning the integration:
Application identifier generated on the Apxor dashboard for your app ()
App Bundle Id : Every app has a unique application ID that looks like com.example.myapp
. This id uniquely identifies the app on the device and also on the app store.
The list of events to setup triggers and track goals, user properties that allows to personalize messages and to target better. ()
Run the following command in your terminal from the project folder. This command will fetch the apxor plugins for you.
Note
If you use proguard to obfuscate the classes, you have to add the following to ignore obfuscation for Apxor SDK classes
Configure the below rules in your proguard-rules.pro
file
Path: <project>/<app-module>/gradle.properties
:
Note:
If you use androidx
libraries, add the following property in gradle.properties
file
To Auto initialize SDK (Recommended), add following meta-data
tag inside your application
tag in your AndroidManifest.xml
file
To manually initialize SDK, call ApxorSDK.initialize
method in your Application
class
Note
If you would like to track uninstalls, you must include apxor-android-sdk-push
dependency in app/build.gradle
file and corresponding JSON object in assets/plugins.json
file
Apxor sends silent push notifications to track uninstalls. Please make sure you handle push notifications which will be sent with your SENDER_ID and ignore all notifications other than your SENDER_ID
Apxor uses your firebase server key to send silent push notifications to track uninstalls in order to measure outcomes of your campaign. To enable this please do the following :
Path : app/build.gradle
Note
To anchor a tooltip or coachmark or badge to any UI element, this step is mandatory.
If you will only use In-app messages, this step can be skipped.
In your MainActivity
onCreate
method you must set the tag for the WebView
as follows to view the tooltips.
We have to verify for two things as follows :
SDK Initialisation
On running your android project lookout for the following log in logcat :
Plugin Initialisation
By default, only error logs are enabled. To see debug logs for plugin initialisation and to confirm tracking event triggers, user properties. Please run the below command in terminal
Note
Apxor uploads data only when the app is minimized to the background. If you are running from Android Studio (emulators or devices), do not stop the app, just press on the "home" button in order for data to be uploaded.
Now as we are done with basic integration, we can go ahead to setup event triggers, capture data for targeting and to personalize messaging.
To Auto initialize SDK, add the following inside your application
plist file.
Open your application's Info.plist as source code.
Copy paste the below piece of code, to create an entry for ApxorSDK.
In your MainViewController
(the ViewController extending the CDVViewController
) init
method you must set the tag for the WebView
as follows to view the tooltips.
Note
Ensure your webview isn't null and the TAG is set correctly.
Lookout for the following log in console output
,
Note
Apxor uploads data only when the app is minimized to the background. If you are running from XCode (emulators or devices), do not stop the app, just press on the "home" button in order for data to be uploaded.
Click here to and
on how to get your firebase sender ID and also FCM server key to share it with apxor to configure uninstall tracking.
to log user properties, events and event properties.
to log user properties, events and event properties.