Latest 0.2.9
Homepage https://github.com/yangyu2010/MJAnalyse
License MIT
Platforms ios 9.0
Dependencies ModuleCapability, FBSDKCoreKit, MJKeyManager
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

MJAnalyse is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'MJAnalyse'

Author

[email protected], [email protected]

License

MJAnalyse is available under the MIT license. See the LICENSE file for more info.

Use

  1. 初始化模块

    /// 初始化统计模块, 包括初始化 iad Facebook adjust三个模块
    + (void)configWithApplication:(UIApplication *)application
                          options:(NSDictionary *)launchOptions;
  2. 统计内购

    // 点击订阅按钮, 统计事件是 发起结账
    [MJAnalyse analysePurchaseWithStatus:MJAnalyseInitiatedCheckout productId:@"your productId" price:9.9];
    [[IAPManager sharedInstance] purchaseItem:@"your productId" completion:^(BOOL isSucceed, id message, id result) {
        if (isSucceed == NO) {
            // 购买失败记录
            [MJAnalyse analysePurchaseWithStatus:MJAnalysePurchasedFailure productId:@"your productId" price:9.9];
            return ;
        }
        // 如果成功后
    
        // 购买成功,不管是试用成功、订阅成功或者续订成功 统计事件是 购买
        [MJAnalyse analysePurchaseWithStatus:MJAnalysePurchased productId:@"your productId" price:9.9];
    
        if ([[IAPManager sharedInstance] isTrialFor:@"your productId"]) {
            // 订阅试用商品 统计事件是 开始试用
            [MJAnalyse analysePurchaseWithStatus:MJAnalyseStartTrial productId:@"your productId" price:9.9];
        } else {
            // 订阅非试用商品或者试用商品试用期过后已正常扣款 统计事件是 订阅
            [MJAnalyse analysePurchaseWithStatus:MJAnalyseSubscribe productId:@"your productId" price:9.9];
        }
    }];     
  3. 统计事件

    /// 统计事件 会统计到Facebook Firebase
    + (void)logEvent:(NSString *)event parameters:(NSDictionary *)parameters;

Latest podspec

{
    "name": "MJAnalyse",
    "version": "0.2.9",
    "summary": "u96c6u6210Facebook, Firebaseu7b49u7b2cu4e09u65b9u7edfu8ba1",
    "homepage": "https://github.com/yangyu2010/MJAnalyse",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Yu Yang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yangyu2010/MJAnalyse.git",
        "tag": "v-0.2.9"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "MJAnalyse/Classes/UIViewController+Analyse.{h, m}",
    "dependencies": {
        "ModuleCapability": [],
        "FBSDKCoreKit": [],
        "MJKeyManager": []
    },
    "subspecs": [
        {
            "name": "Analyse"
        },
        {
            "name": "ViewController"
        }
    ]
}

Pin It on Pinterest

Share This