baidumobileanalysis / cordova-plugin Goto Github PK
View Code? Open in Web Editor NEW百度移动统计的cordova插件
License: Apache License 2.0
百度移动统计的cordova插件
License: Apache License 2.0
hi,添加完百度统计iOS平台能看到数据但是安卓平台看不到
具体步骤如下:
1.添加百度统计cordova 插件 (这里没有设置AppKey,因为 iOS和安卓的不一样所以没有添加)
cordova plugin add cordova-plugin-baidumobstat --save
2.手动添加iOS 平台配置,我参考的是下面这个地址
https://mtj.baidu.com/sdkdoc/iOS/BaiduMTJ_iOS_App_V4.6.4/intergration/manual/objc.html
这里在APPdelegate.m 中配置的iOS的 AppKey,添加完了运行iOS,过5分钟后可以看到统计数据.
3.配置安卓的AppKey(我具体描述一下)
第①步:参考下面这个地址https://github.com/BaiduMobileAnalysis/cordova-sample
配置appkey
修改AndroidManifest.xml中appkey为自己的appkey:
第②步:我用的是webstorm,在/platforms/android/AndroidManifest.xml 中配置BaiduMobAd_STAT_ID为安卓的AppKey,但是重新cordova build android的时候报错,提示BaiduMobAd_STAT_ID 标签重复复,再回头看AndroidManifest.xml 中又添加了一个 这样的标签
第③步:我在/plugins/cordova-plugin-baidumobstat/plugin.xml 中配置
第④步:重新删除安卓平台,再添加
cordvoa platform rm android
cordvoa platform add [email protected] --save
第⑤步:此时在 /platforms/android/AndroidManifest.xml 中可以看到 变成了
第⑥步: 真机运行安卓 APP,过了一会儿(大于5分钟) 在统计平台上看不到统计信息..
出现这个问题的原因是什么呢?
是我还需要在安卓原生代码中进行什么操作吗?
另外,cordova的文档有很多份,我以哪一个为准呢?
参考文档:
https://mtj.baidu.com/web/help/article?id=291&type=0
https://mtj.baidu.com/web/help/article?id=288&type=0
https://mtj.baidu.com/sdkdoc/iOS/BaiduMTJ_iOS_App_V4.6.4/function/h5/cordova.html
https://github.com/BaiduMobileAnalysis/cordova-sample
需要联系我的话 QQ:535172573
谢谢.
cordova-plugin-baidumobstat/CDVBaiduMobStat.h:10:9: fatal error: 'BaiduMobStat.h' file not found
您好,当前插件版本能正式使用么?
您好,按照首页文档配置后,打包成android测试包,在手机运行,没有看到任何统计数据,设置断点也未进入baidustat代码部分,是否还需要在android原生部分调用 StatService.start?谢谢
hi,目前我找到了三份文档都不太一样,按照哪一个接入呢?
1.iOS Cordova接入文档
https://mtj.baidu.com/web/help/article?id=288&type=0
2.Android Cordova集成文档
https://mtj.baidu.com/web/help/articleList?type=0&category=9
3.百度移动统计Cordova插件 How to debug
https://github.com/BaiduMobileAnalysis/cordova-plugin
IOS平台只有一个启动次数,增加事件后没有统计成功,日志打印pu event xxxx, 0
ios 编译报错 'BaiduMobStat.h' file not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.