Flutter Tracking Implementation Guide¶
Warning
Do not reshare this document with anyone unless they need to implement WOGAA tracking on their mobile applications.
Latest Version¶
The latest version of WOGAA Mobile Trackers is 2.0.0
.
Overview¶
- Install via pubspec
- Implement codes for Flutter tracking
- Check Flutter implementation
- Verification of Flutter implementation
Step 1. Install via pubspec¶
Install via pubspec¶
Pubspec is a dependency manager for Flutter.
- Create or update your
pubspec.yaml
, add wogaa tracker package in thedependencies
section. (see example below) - Run
flutter pub get
.
Podfile Example
dependencies:
wogaa_flutter_tracker:
git:
url: https://github.com/wogaa/wogaa_flutter_tracker.git
ref: v2.0.0
Step 2. Implement codes for Flutter Tracking¶
In your main.dart
class,
- Add
import 'package:wogaa_flutter_tracker/wogaa_flutter_tracker.dart';
. - Add the following codes when your application starts for the appropriate environment.
For Staging
Tracker.start();
For Production
Tracker.start('production');
Add track screenview for each view.
Track ScreenView
Tracker.trackScreenView('ScreenName');
Step 3. Check Flutter Implementation¶
Method 1: Manually check the logs¶
Example¶
Flutter: Started (2.0.0)
Flutter: Sent (1)
Info
Flutter: Started (2.0.0)
shows tracker has started and the version number of the tracker Flutter: Sent (1)
shows number of successful event(s) being sent to our backend system
Method 2: 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 about 1 day to process.
Step 4. Verification of Flutter 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/wogaa_flutter_tracker/tree/master/example