Flutter Tracking Implementation Guide¶
Warning
Do not reshare this document with anyone unless they need to implement WOGAA tracking on their mobile applications.
Overview¶
- Install via pubspec
- Implement codes for Flutter tracking
- Verification of Flutter implementation
Step 1. Install via pubspec¶
Pubspec is a dependency manager for Flutter.
You can run this command in your terminal
flutter pub add snowplow_tracker
Or you can add a line with the dependency to your pubspec.yaml
(If not, create a pubspec.yaml
)
dependencies:
snowplow_tracker: ^0.7.0
flutter pub get
. Step 2. Implement codes for Flutter Tracking¶
- Copy the Tracker.dart to your project directory
- In your
main.dart
, initialize the tracker by add this following codeTracker.start('staging')
For Staging
Tracker.start('staging');
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¶
Run your application using Xcode or Android Studio and verify the platform logs below
Example (iOS Tracker)¶
[WOGAA Tracker] Started (6.0.0)
Info
[WOGAA Tracker] Started (6.0.0)
shows tracker has started and the version number of the tracker
Example (Android Tracker)¶
I/WOGAATracker: Started (6.0.0)
Info
I/WOGAATracker: Started (6.0.0)
shows tracker has started and the version number of the tracker
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 React Native 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