Percept 1.0.2

Percept 1.0.2

Maintained by Manish Mishra.



Percept 1.0.2

  • By
  • Percept

percept-ios

Setup

Pending

Usage

import Percept

let config = PerceptConfig(apiKey: apiKey)
Percept.shared.setup(config)

Change the default configuration

let config = PerceptConfig(apiKey: apiKey)
config.captureAppLifecycleEvents = false
config.debug = true
// .. and more

Capture an event

Percept.shared.capture("Add To Cart", properties: ["item_name": "product name"])

Set user id

Percept.shared.setUserId("testUser", withPerceptUserProps: [PerceptUserProperty.NAME: "John Doe"], additionalProps: ["isVerified": false])

We expose some default user property keys in PerceptUserProperty. Please use them as this helps in standarization and usage in the Engage feature provided by Percept.

You can set user properties post setting user id too by calling setCurrentUserProperties method.

Percept.shared.setCurrentUserProperties(withPerceptUserProps: [PerceptUserProperty.NAME: "John Doe"], additionalProps: ["isVerified": false])

Set global properties

Percept.shared.setGlobalProperties(["tenant": "percept"])

Get global properties

Percept.shared.getGlobalProperties(["tenant": "percept"])

Remove global property

Percept.shared.removeGlobalProperty("tenant")

Clear

This will clear all user info and cached data. Call clear function on logout to delete all user related information

Percept.shared.clear()

Close the SDK

Percept.shared.close()