
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cordova-plugin-apxor-sdk
Advanced tools
Cordova plugin wrapper for Apxor Android SDK.
cordova plugin add cordova-plugin-apxor-sdk
meta-data
tag inside your application
tag in your AndroidManifest.xml
file<application>
<!-- You must replace your app in android:value attribute -->
<meta-data android:name="APXOR_APP_ID" android:value="YOUR_APP_ID" />
</application>
Add the following after your import statements in every component where you use Apxor SDK APIs
declare var ApxorSDK: any;
Sets a unique user identifier. You can set it when user logged into application and reset it when users logged out
// Syntax
ApxorSDK.setUserIdentifier("STRING");
// Example
ApxorSDK.setUserIdentifier("<unique_user_id>");
// Syntax
ApxorSDK.logAppEvent(event_name, properties);
// Example
ApxorSDK.logAppEvent("ADD_TO_CART", {
"userId": "johnwick@example.com",
"value": 1299,
"item": "Sony Head Phone 1201"
});
// Syntax
ApxorSDK.logClientEvent(event_name, properties);
// Example
ApxorSDK.logClientEvent("ADD_TO_CART", {
userId: "johnwick@example.com",
value: 1299,
item: "Sony Head Phone 1201",
});
Set unique user properties only when you need to add or update them. All the properties whose value is null
or undefined
will be ignored
// Syntax
ApxorSDK.setUserCustomInfo(properties);
// Example
ApxorSDK.setUserCustomInfo({
Age: 10,
Name: "John Wick",
});
A Session can be simply defined as user journey as he opens the app, until he closes the app. There can be various pieces of information that be very impactful when accumulated in a session. For example, location in a session can be useful to know exactly where, the user is utilizing the app most.
To add session attributes that are specific to a session,
ApxorSDK.setSessionCustomInfo({network: "4G", city: "Newyork"});
You can track time spent in tabs/components inside your application
ApxorSDK.trackScreen("CartPage");
Note
You can check the typings or APIs exposed by exploring
plugins/cordova-plugin-apxor-sdk/www/ApxorCordovaPlugin.js
orplugins/cordova-plugin-apxor-sdk/src/ApxorSDK.d.ts
If your application handles deeplinks within Cordova layer, make sure you add the following in your root component.
Note: By default Apxor SDK doesn't redirect external URLs which will be opened in Mobile browser. You need to handle that expliitly in your code
ApxorSDK.registerDeeplinkHandler((deeplinkUrl) => {
// Whenever redirection happens from InApp notification buttons,
// this callback will be executed.
switch (deeplinkUrl) {
case "scheme://about":
// Redirect to About Component
break;
default:
// Check if it's external URL and redirect to Browser
break;
// and so on
}
});
Read more here
FAQs
A cordova plugin for Apxor SDK
We found that cordova-plugin-apxor-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.