
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
cordova-plugin-janalytics-google-play
Advanced tools
极光的 Cordova 数据统计插件。
此插件包含jcore,当你的APP总使用了不止一个极光服务,请使用1.0.3版本后,jcore库已经改为弱引用(依赖于cordova-plugin-jcore),开发者不需担心多个极光插件带来的库文件冲突问题。cordova-plugin-janalytics-no-jcore
cordova plugin add cordova-plugin-janalytics --variable API_KEY=极光KEY --variable CHANNEL=渠道名
cordova plugin add https://github.com/wilhantian/cordova-plugin-janalytics --variable API_KEY=极光KEY --variable CHANNEL=渠道名
cordova plugin add Your_Plugin_Path --variable API_KEY=极光KEY --variable CHANNEL=渠道名
注意: CHANNEL不能为纯数字
用例中的'success', 'error'参数代表成功回调函数与失败回调函数.
extMap为附加参数,仅能纯属一个小于10个字段的1级key-value对象 正确用例:
{ a:1, b:2, c: 3}错误用例:{a: {c: 1, b:2}}下面将不再提及
Janalytics.setDebugModel(enable, success, error);
boolean 是否开启debug模式functionfunctionJanalytics.setDebugModel(true,
function(){
alert("操作成功");
},
function(err){
alert(err);
}
);
Janalytics.onPageStart(pageName, success, error)
string 页面名称functionfunction注意 此接口应当尽可能与onPageEnd对应
Janalytics.onPageStart("登陆页面", function(){}, function(err){});
Janalytics.onPageEnd(pageName, success, error)
string 页面名称functionfunctionJanalytics.onPageEnd("登陆页面", function(){}, function(err){});
Janalytics.onCountEvent(eventId, extMap, success, error)
string 自定义事件IDkeyValuefunctionfunction注意 此接口属于自定义事件,需要提前到极光控制台中创建与eventId同名的事件
Janalytics.onCountEvent("计数事件测试", {a:1, b:2}, function(){}, function(err){});
Janalytics.onCalculateEvent(eventId, eventValue, extMap, success, error)
string 自定义事件IDnumber 计算值keyValuefunctionfunction注意 此接口属于自定义事件,需要提前到极光控制台中创建与eventId同名的事件
Janalytics.onCalculateEvent("计算事件测试", 1.2, {a:1, b:2}, function(){}, function(err){});
Janalytics.onLoginEvent(loginMethod, loginSuccess, extMap, success, error)
string 登陆方式boolean 是否成功登陆keyValuefunctionfunctionJanalytics.onLoginEvent("QQ登陆", true, {a:1, b:2}, function(){}, function(err){});
Janalytics.onRegisterEvent(registerMethod, registerSuccess, extMap, success, error)
string 注册方式boolean 是否成功注册keyValuefunctionfunctionJanalytics.onRegisterEvent("手机号注册", true, {a:1, b:2}, function(){}, function(err){});
Janalytics.onRegisterEvent(browseId, browseName, browseType, browseDuration, extMap, success, error)
string 浏览IDstring 浏览名string 浏览类型number 浏览时长keyValuefunctionfunction Janalytics.onRegisterEvent(
browseId, //浏览ID `string`
browseName,//浏览名 `string`
browseType,//浏览类型 `string`
browseDuration,//浏览时长 `long`
extMap,
success, error
)
Janalytics.onPurchaseEvent(purchaseGoodsid, purchaseGoodsName, purchasePrice, purchaseSuccess, purchaseCurrency, purchaseGoodsType, purchaseGoodsCount, purchaseGoodsCount, extMap, success, error)
string 商品IDstring 商品名number 商品价格boolean 是否购买成功string 货币类型 ("USD":美元,"CNY":人民币)string 商品类型number 商品数量keyValuefunctionfunction Janalytics.onPurchaseEvent(
purchaseGoodsid, //商品ID `string`
purchaseGoodsName, //商品名 `string`
purchasePrice, //商品价格 `float`
purchaseSuccess, //是否购买成功 `booleabn`
purchaseCurrency, //货币类型 `string` ("USD":美元,"CNY":人民币)
purchaseGoodsType, //商品类型 `string`
purchaseGoodsCount, //商品数量 `int`
extMap,
success, error
)
Janalytics.crashLogON(success, error)
functionfunctionJanalytics.setLocation(latitude, longitude, success, error)
number 纬度number 经度functionfunction如有bug请提issues, enjoy!
FAQs
JAnalytics for cordova plugin with Google Play
We found that cordova-plugin-janalytics-google-play 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
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.