website logo
HomeGo to Dashboard
User Guide
How-To Videos
Developers
Navigate through spaces
⌘K
Getting Started
Introduction
Compatibility
Terminology
SDK Installation
Shopify
Any Website
Dukaan
Angular 2+
WooCommerce
WordPress
Android Native
iOS Native
Flutter
Cordova
Ionic
React Native
Data Integration
Data Models
Mandatory Events
Mandatory Properties
Call to Action
System Events
Device Properties
Docs powered by
Archbee
SDK Installation
iOS Native

Tracking Events on iOS

3min

Tracking Events

Once you integrate the SDK, CooeeSDK will automatically start tracking some default System Events. Apart from these, you must track Mandatory Events as well.

The event must be tracked once your screen(ViewController/SwiftUI View) is fully loaded.

The following example demonstrates a View Item event.

ObjectiveC
Swift
|
- (void) sendViewItemEvent 
{
    CooeeSDK *cooeeSDK = [CooeeSDK getInstance];

    NSDictionary *props = @{
        @"item": @{
            @"id": @"1234",
            @"name": @"iPhone X",
            @"category": @{
                @"id": @"cat1",
                @"name": @"Smartphones"
            }
        }
    };

    @try {
        [cooeeSDK sendEventWithEventName:@"View Item" eventProperties:props error:nil];
    } @catch (NSException *exception) {
        NSLog(@"%@", exception.reason);
    } @finally {
        NSLog(@"Finally condition");
    }
}


Important!

  • Do not add . (dot) in event property key string.
  • Do not start the event name with CE



Updated 03 Mar 2023
Did this page help you?
PREVIOUS
Get Started for IOS
NEXT
Tracking Properties on iOS
Docs powered by
Archbee
TABLE OF CONTENTS
Tracking Events
Important!
Docs powered by
Archbee