API Docs
Search…
iOS Integration

Initialize Cartup IOS SDK

Once you've set up your build system or IDE to use the Cartup AI iOS library, you can initialize it in your code by calling init with your application context and your Cartup AI secret token.
1
import Cartup
2
cartup.init(orgname: String, orgid: String, secretkey: String, domain: String)
Copied!
Parameters
Description
orgname
YOUR_ORGNAME Example: “example.org”
orgid
YOUR_ORGID
secretkey
YOUR_SECRET_KEY
domain
YOUR_DOMAIN
You can find your secret key, orgid in the Cartup console.

Sending Data

You can send an event from anywhere in your application. Better understand user/product behavior by storing details that are specific to the event (properties). After initializing the library, you can send the events.

Event Handler

To send events, get event handler after you initialized the cartup iOS library.
1
let eventHandler = cartup.getEventHandler()
Copied!

Sending Tracking Events

Function to send tracking events. The function sends user browsing events. There are multiple labels based on page type for example (product view/cart page etc)
Last modified 2mo ago