ios--Baidu Statistics

Source: Internet
Author: User

Baidu Mobile Statistics (http://mtj.baidu.com) is a professional mobile application statistical analysis tool that supports iOS and Android platforms. Developers can conveniently embed the statistics SDK,
Comprehensive monitoring of mobile applications, real-time monitoring of product performance. In addition, Baidu Mobile Statistics provides comprehensive report analysis to help app developers understand product performance, in order to achieve sophisticated operations in the era of mobile internet.
Specific view: http://yingxiao.baidu.com/support/mtj/index.html

To http://developer.baidu.com/wiki/index.php?title=
%e5%b8%ae%e5%8a%a9%e6%96%87%e6%a1%a3%e9%a6%96%e9%a1%b5/%e7%99%be%e5%ba%a6%e7%a7%bb%e5%8a%a8%e7%bb%9f%e8%ae% A1api
/%e7%99%be%e5%ba%a6%e7%a7%bb%e5%8a%a8%e7%bb%9f%e8%ae%a1_ios%e7%89%88sdk&diff=prev&oldid=537 this website to download the SDK, See the documentation for more information.
The main code is as follows:
Baidu Statistics
-(void) Baidustat
{
Add Baidu Statistics
baidumobstat* Stattracker = [Baidumobstat defaultstat];
Stattracker.enableexceptionlog = YES; Whether to allow the interception and sending of the crash information, please set yes or no
Stattracker.channelid = @ "Office";//Set up your app's publishing channel
Stattracker.channelid = @ "AppStore";//Set up a distribution channel for your app
Stattracker.logstrategy = baidumobstatlogstrategyapplaunch;//Send log according to the sending policy set by the developer
Stattracker.logsendinterval = 1; 1 indicates that the log is sent at an interval of 1 hours, which takes effect when Logstrategy is set to Baidumobstatlogstrategycustom
Stattracker.logsendwifionly = NO; Whether to send log data only in the case of WiFi
Stattracker.sessionresumeinterval = 10;//Set the app into the background and back to the foreground for the same session interval [0~600s], more than 600s is set to 600s, the default is 30s
Stattracker.shortappversion = iosappversion; parameter is NSString * Type, custom app version information, if not set, default from Cfbundleversion
Stattracker.enabledebugon = NO; When debugging open, there will be log printing, release time to close
/* If necessary, you can pass in your own adid
NSString *adid = @ "";
if ([[[[Uidevice Currentdevice] systemversion] floatvalue] >= 6.0f) {
AdId = [[[Asidentifiermanager Sharedmanager] advertisingidentifier] uuidstring];
}
Stattracker.adid = Adid;
*/
/**
* Production
*/
[Stattracker startwithappid:@ "Fdab6233e0"];//set the MTJ of the app you added on the Appkey website, where AppID is the app Appkey
/**
* Test
*
*/
[Stattracker startwithappid:@ "ac3818509b"];//set the MTJ of the app you added on the Appkey website, where AppID is the app Appkey
}

Baidu Statistics
-(void) Tabbarcontroller: (Uitabbarcontroller *) Tabbarcontroller Didselectviewcontroller: (Uiviewcontroller *) Viewcontroller
{
int index = Tabbarcontroller.selectedindex;
baidumobstat* Stattracker = [Baidumobstat defaultstat];
[Stattracker logevent:@ "TabClick3" eventlabel:[nsstring stringWithFormat: @ "tab%d", index]];
}

ios--Baidu Statistics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.