Tracking

Info
Ocamba allows you to track custom events [String:Any] that can be used as a trigger to fire push notification.

To track custom event use Ocamba track as follows:


```swift
OcambaHoood.track(["ab":"1", "cd" :2])
```

Send track object:


```swift
OcambaHoood.sendTrack()
```

Read track objects:


```swift
OcambaHoood.getTrack()
```

This will for example return [“ab”: “1”, “cd”: “2”]

Read specific track object:


```swift
OcambaHoood.getTrackFor(key:"ab")
```

Return value for this key will be “1”.

Remove track objects from local storage:


```swift
OcambaHoood.removeTrackFor(key:String)
```

Remove track object from user (on platform):


```swift
OcambaHoood.track(["ab":""])
OcambaHoood.sendTrack()
```

This user in our database will have extra params with key “cd”, key “ab” will be removed.

On This Page