Skip to content

Brytecore/brytescore-objc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Lead Booster Analytics

brytescore-objc

brytescore-objc is the open-source iOS SDK that connects your website with the Brytescore API. The Brytescore API allows you to track your users' behavior and score their engagement.

Example

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

Installation

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

    use_frameworks!
    pod "BrytescoreObjcAPI"

Import BrytescoreAPI

Import brytescore-objc in your .h file.

Objective-C

    @import BrytescoreObjcAPI;

Methods

Initialization

Sets the API key. Generates a new unique session ID. Retrieves the saved user ID, if any.

  • parameter {string} The API key.

Objective-C

    BrytescoreAPIManager *apiManager = [[BrytescoreAPIManager alloc] initWithApiKey: @"<api-key>"];

getAPIKey

Returns the current API key

  • returns: The current API key

Objective-C

    [apiManager getAPIKey];

load

Function to load json packages.

  • parameter {string} The name of the package.

Objective-C

    [apiManager load:@"realestate"];

devMode

Sets dev mode. Logs events to the console instead of sending to the API. Turning on dev mode automatically triggers debug mode.

  • parameter enabled: If true, then dev mode is enabled.

Objective-C

    [apiManager devMode:enabled];

debugMode

Sets debug mode. Log events are suppressed when debug mode is off.

  • parameter enabled: If true, then debug mode is enabled.

Objective-C

    [apiManager debugMode:enabled];

impersonationMode

Sets impersonation mode. Bypasses sending information to the API when impersonating another user.

  • parameter enabled: If true, then impersonation mode is enabled.

Objective-C

    [apiManager impersonationModeWithEnabled: enabled];

validationMode

Sets validation mode. Adds a validation attribute to the data for all API calls.

  • parameter enabled: If true, then validation mode is enabled.

Objective-C

    [apiManager validationMode:enabled];

brytescore

Start tracking a property specific to a loaded package.

  • parameter property: The property name
  • parameter data: The property tracking data

Objective-C

    [apiManager brytescore:propertyName withData:data];

pageView

Start a pageView.

  • parameter data: The pageView data.
  • data.isImpersonating
  • data.pageUrl
  • data.pageTitle
  • data.referrer

Objective-C

    [apiManager pageView:data];

registeredAccount

Sends a new account registration event.

  • parameter data: The registration data.
  • data.isImpersonating
  • data.userAccount.id

Objective-C

    [apiManager registeredAccount:data];

submittedForm

Sends a submittedForm event.

  • parameter data: The chat data.
  • data.isImpersonating

Objective-C

    [apiManager submittedForm:data];

startedChat

Sends a startedChat event.

  • parameter data: The form data.
  • data.isImpersonating

Objective-C

    [apiManager startedChat:data];

updatedUserInfo

Updates a user's account information.

  • parameter data: The account data.

Objective-C

    [apiManager updatedUserInfo:data];

authenticated

Sends a user authentication event.

  • parameter data: The authentication data.
  • data.isImpersonating
  • data.userAccount
  • data.userAccount.id

Objective-C

    [apiManager authenticated:data];

killSession

Kills the session.

Objective-C

    [apiManager killSession];

About

Objective-C library for Lead Booster Analytics

Resources

Stars

Watchers

Forks

Packages

No packages published