These examples show a Track Event embedded into an alert dialog and triggered once the OK button is clicked. The Track Event part of the code is bolded.
See Track Events Configuration for general information about Track Events.
Android
Track Event example
Pendo.track("OK_Track", null);
Track Event with properties example
HashMap<String, Object> trackEventProperties = new HashMap<>();
trackEventProperties.put("track_property_name", "track_property_value");
Pendo.track("OK_Track", trackEventProperties);
iOS
Track events example
Swift
PendoManager.shared().track("OK_Track", properties: nil)
Objective C
[[PendoManager sharedManager] track:@"OK_Track" properties:nil];
Track Events with properties example
Swift
let trackEventProperties = ["track_property_name": "track_property_value"]
PendoManager.shared().track("OK_Track", properties: trackEventProperties)
Objective C
NSDictionary *trackEventProperties = @{ @"track_property_name": @“track_property_value“ };
[[PendoManager sharedManager] track:@"OK_Track" properties:trackEventProperties];
The Track Events are collected by Pendo instantly and are displayed first as Raw Events in Settings > Subscription Settings. Open the Applications tab, and then find and open the relevant app from your Applications list. Open the Raw Events tab.
Up to an hour after, the Track events are displayed as aggregated data and are shown in the UI. To view the Track Events, go to Product > Track Events and change the time filter to Today to see today’s results.