Latest 1.0.3
Homepage https://github.com/xsio/clabanalytics
License MIT The MIT License (MIT)

Copyright (c) 2011-2016 convertlab.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Platforms ios 7.0, requires ARC

A SDK to send custom events to CLab.

Prerequisite

iOS >= 8.0

How to use

1 Import ConvertSDK

You can choose one of the following two methods to integrate ConvertSDK into your application

1.1 Use CocoaPods to install ConvertSDK
  pod "ConvertSDK"
1.2 Using framework
  • Download libConvertSDK.framework from https://github.com/xsio/clabanalytics/framework. Unzip it and drag the framework into your project.
  • In your Project Targets’s Build Settings, find ‘Other Linker Flags’, add ‘-ObjC’ to the linker.

2 import ConvertSDK.h in your project

You can add ConvertSDK.h to your AppDelegate.m and the ViewControllers you will uses it. An easier way is to add it to your pch file

3 Setting up tenantId, appId & secret

You can choose one of the following two methods to setup your tracking related variables.

3.1 Setting up in info.plist

Add ConvertSDKAppId & ConvertSDKSecret into your application’s info.plist

<key>ConvertSDKAppId</key>
<string>ca02cc145ece36b41</string>
<key>ConvertSDKSecret</key>
<string>356694ca12419ea49b4d487b4357844647444ec1</string>
3.2 Setting up in code

In AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [ConvertSDK sharedInstance].appId = @"ca02cc145ece36b41"; // replace with your appid.
    [ConvertSDK sharedInstance].secret = @"356694ca12419ea49b4d487b4357844647444ec1"; // replace with your secret.
    return YES;
}
4 Send custom events

For example, you can send a custom event while clicking a button

- (IBAction)track:(id)sender
{
    // Sample test event
    [[ConvertSDK sharedInstance] track:@"sample_event"];
}

or specify target & customized properties

- (IBAction)track:(id)sender
{
    [[ConvertSDK sharedInstance] track:@"click_event" targetName:@"login_button" targetId:@"1" withProperties:@{@"username": self.loginTextFiled.text}];
}

License

ConvertSDK is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "ConvertSDK",
    "version": "1.0.3",
    "summary": "Convert Tracking SDK for iOS",
    "homepage": "https://github.com/xsio/clabanalytics",
    "source": {
        "git": "https://github.com/xsio/clabanalytics.git",
        "tag": "v1.0.3"
    },
    "authors": "ConvertLab => [email protected]",
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "ConvertSDK/**/*.{h,m}",
    "requires_arc": true,
    "license": {
        "type": "MIT",
        "text": "The MIT License (MIT)nnCopyright (c) 2011-2016 convertlab.comnnPermission is hereby granted, free of charge, to any person obtaining a copynof this software and associated documentation files (the "Software"), to dealnin the Software without restriction, including without limitation the rightsnto use, copy, modify, merge, publish, distribute, sublicense, and/or sellncopies of the Software, and to permit persons to whom the Software isnfurnished to do so, subject to the following conditions:nnThe above copyright notice and this permission notice shall be included innall copies or substantial portions of the Software.nnTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORnIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEnAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERnLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INnTHE SOFTWARE.n"
    }
}

Pin It on Pinterest

Share This