Skip to content

iOS Tracking Implementation Guide

Warning

Do not reshare this document with anyone unless they need to implement WOGAA tracking on their mobile applications.


Dependencies

  1. Snowplow Tracker 6.0
  2. Wogaa Tracker 6.2.0

Step 1. Install dependencies via CocoaPods or Manually

Method 1: Install via CocoaPods

CocoPods is a dependency manager for Swift and Objective-C Cocoa projects.

  1. Create or update your Podfile. (see example below)
  2. Run pod install.

Podfile Example

    pod 'SnowplowTracker', '~> 6.0'
  1. In Xcode, go to File > Add Package Dependencies

  2. Go to Snowplow iOS Tracker github page and copy the github link

  3. Search the ios snowplow tracker by github link

  4. Add Snowplow Tracker to your project


Step 2. Implement codes for iOS Tracking

Download and Copy this Tracker.swift file, and then add it to the your project directory.

Import Tracker.swift file to start using the Tracker APIs library

  1. Initialize the tracker

Staging

    Tracker.start("STAGING");

Production

    Tracker.start("PRODUCTION");

Add track screenview for each view.

Track ScreenView

    Tracker.trackScreenView("ScreenName");

Step 3. Check iOS Implementation

Method 1: Manually check the logs

Example

[WOGAA Tracker] Started (6.2.0)

Info

[WOGAA Tracker] Started (6.2.0) shows tracker has started and the version number of the tracker

Use tool to check if data is being received in your environment(s).

Info

- Staging received events will take about 10 seconds to process. (Last 24 hours)

- Production received events will take 1 day to process.


Step 4. Verification of iOS Implementation

A verification email will be sent once we have successfully received data from your mobile application in production server.

It may take up to 7 working days for the verification. Please let us know if there is any issues with regards to this via support@wogaa.gov.sg


Reference Implementation

https://github.com/wogaa/mobile-tracker-examples/tree/main/iOS