Pending
import Percept
let config = PerceptConfig(apiKey: apiKey)
Percept.shared.setup(config)
let config = PerceptConfig(apiKey: apiKey)
config.captureAppLifecycleEvents = false
config.debug = true
// .. and more
Percept.shared.capture("Add To Cart", properties: ["item_name": "product name"])
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])
Percept.shared.setGlobalProperties(["tenant": "percept"])
Percept.shared.getGlobalProperties(["tenant": "percept"])
Percept.shared.removeGlobalProperty("tenant")
This will clear all user info and cached data. Call clear function on logout to delete all user related information
Percept.shared.clear()
Percept.shared.close()