@rokt/cordova-plugin-roktsdk v4.3.0
Overview
The Rokt Cordova SDK enables you to integrate Rokt into your Cordova mobile apps to drive more value from—and for—your customers. The SDK is built to be lightweight, secure, and simple to integrate and maintain, resulting in minimal lift for your engineering team.
The Rokt Cordova SDK can be used by Rokt partners to display overlay placements, or by Rokt advertisers to record conversions for campaigns.
Resident Experts
- Emmanuel Tugado - emmanuel.tugado@rokt.com
- Sahil Suri - sahil.suri@rokt.com
- Danial Motahari - danial.motahari@rokt.com
Integration Guide
To add this SDK in your application, go to the root of your project via Terminal
and add run the command:
$ cordova plugin add @rokt/cordova-plugin-roktsdk
Usage
The Rokt SDK provides two methods:
- initialize(String ROKT_TAG_ID, String AppVersion)
- execute(String ViewName, Object UserAttributes, Function successCallback, Function errorCallback)
We recommend calling initialize
at the start of your application
// 1) Replace the integration test tag ID (222) with your unique Rokt Tag ID
// 2) Replace 1.0.0 with the application version
RoktSDK.initialize(
"222",
"1.0.0",
function(msg) {
console.log(msg);
},
function(err) {
console.log(err);
}
);
Followed by execute
to show your placement. successCallback
returns a message parameter that allows you to track SDK events
RoktSDK.execute(
"my_view_name",
{
"email" : "j.smith@example.com",
"firstname": "Ginger",
"lastname": "Smith",
"mobile": "(555)867-5309",
"postcode": "90210",
"country": "US"
},
function(msg) {
console.log(msg);
// msg can be any of these
// 1. onLoad - your placement loads
// 2. onUnload - your placement unloads
// 3. onShouldHideLoadingIndicator - hook to show a loading indicator
// 4. onShouldShowLoadingIndicator - hook to hide a loading indicator
},
function(err) {
console.log(err);
}
);
Project structure
This project consists of sdk which contains www] which is the main entry for the sdk, android, iOS platform specific code for the sdk.
What are the branches?
There is one main branch with release- prefix. This branch is where all development branches are merged into. Publishing the SDK is possible with release- prefix branches only.
Update Rokt Native SDK
To update the iOS rokt sdk, make the following changes.
update <framework src="Rokt-Widget" type="podspec" spec="~> X.X.X" />
For Android, do the folliwing
update implementation "com.rokt:roktsdk:X.X.X"
Update Rokt Cordova SDK
To update the cordova SDK before the release, make the following changes.
update version X.X.X
Local Testing
Local Testing can be done with the sister repo: rokt-sdk-cordova-demo Make sure the two repositories are loaded in the same parent directory. See rokt-sdk-cordova-demo README for further instructions
License
Copyright 2020 Rokt Pte Ltd
Licensed under the Rokt Software Development Kit (SDK) Terms of Use Version 2.0 (the "License");
You may not use this file except in compliance with the License.
20 days ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
2 months ago
3 months ago
3 months ago
3 months ago
3 months ago
4 months ago
4 months ago
4 months ago
4 months ago
5 months ago
8 months ago
10 months ago
9 months ago
9 months ago
1 year ago
11 months ago
12 months ago
12 months ago
11 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago