Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
smartech-cordova
Advanced tools
Follow the installing instructions
$ cordova plugin add smartech-cordova
In order to identify a user, set unique user identity by adding given snippet as per the requirement.
Smartech.setIdentity(<unique_user_identity>,function(response){
//Your code here
}, function(error){
});
In order to wipe out user identity from the SDK, add given snippet as per the requirement.
Smartech.clearIdentity(function(response){
//Your code here
}, function(error){
});
To capture login activity of the user, add given snippet inside the js file of your project when the user gets logged in successfully.
Smartech.login(<unique_user_identity>,function(response){
//Your code here
}, function(error){
});
To capture logout activity of the user, add given snippet inside the js file when the user gets logged out successfully.
Smartech.logout(function(response){
//Your code here
}, function(error){
});
Smartech.clearIdentity(function(response){
//Your code here
}, function(error){
});
Note: Avoid calling clearIdentity() method if one wants to track user activity even if user has logged out of the application.
To capture custom activity performed by the user, add given snippet as per the requirement.
Smartech.track(<event_name>, payload,function(response){
//Your code here
}, function(error){
});
E.g.
const payload = {
name: 'Galaxy',
description: '20gram bars',
id: '1'
};
Smartech.track("Add To Cart",payloadData,function(response){
//Your code here
}, function(error){
});
To capture and map user attributes, add given snippet as per the requirement.
Smartech.profile(<profile_object>,function(response){
//Your code here
}, function(error){
});
E.g.
const payload = {
NAME: "User Name",
EMAILID: "abc@xyz.com",
AGE: "30",
MOBILE: "4545748"
};
Smartech.profile(payloadData,function(response){
//Your code here
}, function(error){
});
Note: Use attribute name in capital letters as shown above.
To fetch delivered push notifications, add given snippet as per the requirement.
Smartech.getNotifications(<count>,function(response){
//Your code here
}, function(error){
});
Note: The method returns a JSONArray of delivered push notifications for the user.
If the end user wants to opt out of being tracked, add given snippet as per the requirement.
Smartech.optOut(<boolean_flag>,function(response){
//Your code here
}, function(error){
});
Note: The method accepts a boolean value.
If an end user wants to opt out, the flag should be passed as true. Once the user opts out, SDK will not be able to track that particular user further and no communications will be received by that user.
If an end user wants to opt in, the flag should be passed as false. Once the user opts in, SDK will be able to track that particular user further and next communications will be received by that user.
In order to track user location and pass it further to Smartech, add given snippet as per the requirement.
Smartech.setUserLocation(<double_lat>, <double_long>,function(response){
//Your code here
}, function(error){/*Handle error here */}
);
Note: The method mentioned above accepts 3 parameters including context, latitude & longitude. Data type of ‘latitude’ & ‘longitude’ should compulsorily be 'floating value'. In case if any parameter is null, SDK will not be able to persist user location.
To obtain GUID of the user from the SDK, add given snippet as per the requirement.
Smartech.getGUID(function(response){
//Your code here
}, function(error){
});
To obtain the FCM token of the user from the SDK, add given snippet as per the requirement.
Smartech.getPushToken(function(response){
//Your code here
}, function(error){
});
FAQs
Smartech Plugin for Cordova/PhoneGap/Ionic
We found that smartech-cordova demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.