Implement and Verify Code¶
This document is a guide to implement and verify WOGAA event trigger codes on your site.
Do not reshare this document with anyone unless they need to implement WOGAA tracking on their websites.
This guide will take you through the steps to implement and verify event trigger code for Transactional Service in different environments.
For implementation of code in Test and Production environment,
Please ensure that you have done the following before you proceed
- Successfully implemented wogaa.js v2 code for Informational Service ( Implementation and Verify Guide for Informational Service )
- Collate Transactional service's tracking ID ( How to get your tracking ID )
For code implementation of multiple transactional services, we recommend you to collate all the unique tracking ID for each service required
Implement and Verify Event Code¶
Please ensure you have the tracking ID for the services you wish to implement event tracking code for. ( How to get your tracking ID )
There are 2 event trigger codes for you to use
Event trigger code to start tracking the transactional services
Event trigger code to end tracking the transactional services
The correct tracking ID should be passed to
If the tracking ID passed to either of the event trigger code doesn't belong to your website, event trigger code will not work.
Transactional service belonging to Example Website (
|Name of Transactional service||Tracking ID|
|Creation of user|| |
|Apply for approval|| |
When should I invoke
window.wogaaCustom.startTransactionalService('example-1') should be invoked when the website user starts the transactional service
Creation of user
window.wogaaCustom.completeTransactionalService('example-1') should be invoked when the website user completes the transactional service
Creation of user
What argument should I pass to
window.wogaaCustom.startTransactionalService('example-1')will work since the Example Webite
www.example.gov.sghas tracking ID
example-1tagged under it.
window.wogaaCustom.startTransactionalService('testing-1')will not work since the Example Webite
www.example.gov.sgdoesn't have tracking ID
testing-1tagged under it.
Verify if your site is sending both events¶
We will need the Chrome extension Snowplow Chrome Extension to verify the base code
- Install Snowplow Chrome Extension
- On Chrome, navigate to the website with the base code installed.
- Right-click on the page and click Inspect
- Inside the Inspect console, click on the Snowplow Tab,
Refresh the page where the base code is installed and see that
Structured Event: transactionalServiceevent is populated.
Select on one of the
Structured Event: transactionalServiceevents as shown below:
- Event action is either
- Collector address for staging is
- Collector address for production is
completeevent could be in different locations on your site. In this case, you may only see one event at a time. Navigate to the page where you installed code, and verify both events are triggered in their respective page.
- Event action is either
Verify if Wogaa server is receiving both events¶
The verification of Transactional Service on the server side is done automatically, however to be considered as verified, both
completeTransactionalService events must be captured by our backend server.
It may take up to 24 hours for the verification. Once verified, we send out an email notification to Officer In Charge (OIC) for the Transactional Service. Please let us know if there is any issues with regards to this via firstname.lastname@example.org
Self service verification tool (staging only)¶
This tool allows you to verify if your implementation is working correctly in your test or staging environment by showing the past 7 days' transaction count. Please note it will not query the events from production server.
Please check if your test or staging setup is using the following script
Then use this tool to check your transactional service events by either providing the
domain of your test server or staging server, or providing the
tracking_id of your transactional service. Please omit
https:// when providing the
How to Get Your Tracking ID¶
- Login to wogaa.sg
- View your respective transactional service under transactional services tab in "Manage Services"
- You will see the respective tracking ID in your transactional service details page as shown below
The code snippets below are just some example on how to call
completeTransactionalService(). You don't necessarily have to follow the example below.