Jetpack Compose
Last updated
Last updated
Things to keep handy before starting your integration with Apxor
Please have the following handy before beginning the integration:
Application identifier generated on the Apxor dashboard for your app ()
App Bundle Id : Every android 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 google play store.
The list of events to setup triggers and track goals, user properties that allows to personalize messages and to target better. (Read more on how you can setup here)
Firebase Cloud Messaging (FCM) Server Key : For tracking uninstalls, Apxor sends silent push notifications to measure your campaign outcomes. ()
Understanding dependencies to add to your project
apxor-android-sdk-core
Core Plugin is used to track events for to measure their results and consists of essential information that controls other plugins.
How many of my users have clicked on the cart icon after showing them a nudge Sample Event : 'ViewCart'
apxor-android-sdk-qe
plugin is used to setup behavioural triggers for the campaigns which helps to setup campaign rules.
Show a campaign to users who land on the home screen and add an item to the cart.
apxor-android-sdk-rtm
plugin is used for the show experiences created from the design library using the Apxor dashboard.
Show a tooltip on the cart icon with messaging "Tap here to view items"
surveys
plugin is used to show surveys created using the Apxor dashboard.
An NPS survey that would ask the user to rate the app experience on a scale of 1-10.
wysiwyg
plugin is used to facilitate creation of campaigns by mirroring your mobile screen to identify the right UI element to show the campaign.
Casting your mobile screen to the dashboard and selecting the hamburger icon
apxor-jetpack-compose
plugin is used to find and extract view ids
Displaying a tooltip on one of the UI element "Subscribe"
Add Maven URL in project level build.gradle
file to load the plugins.json
file you will create in Step 3.
Path: <project>/build.gradle
:
Add plugin dependencies to your application build.gradle
file
Path: <project>/<app-module>/build.gradle
:
Create an assets folder
in android app module
and create the plugins.json
that contains the below code.
This is used to initialise the dependencies that are used while adding Apxor SDK in the third step.
Path: src/main/assets/plugins.json
:
Exoplayer enables to configure Picture In Picture videos from Apxor dashboard and typically increases the app size by ~1Mb, if you are already using exoplayer in your app this step is not needed else add the following dependency in the application build.gradle
file
Add the following properties gradle.properties
file
Path: <project>/<app-module>/gradle.properties
:
Configure the below rules in your proguard-rules.pro
file
Path: <project>/<app-module>/proguard-rules.pro
:
For jetpack compose view component, add an apxorLabel modifier. Add the import statement in all the files and the apxorLabel to all the view ids where you want to display coachmarks, tooltips and badges.
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
To Auto initialize SDK (Recommended), add following meta-data
tag inside your application
tag in your AndroidManifest.xml
file
Path: <project>/<app-module>/src/AndroidManifest.xml
:
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
on how to get your firebase sender ID and also FCM server key to share it with apxor to configure uninstall tracking.
Here is how you can get the Apxor Application Identifier as mentioned in the