Student Application (Populi Forms) Tracking in GTM

Posted by: Felix Kaboto Date Posted: May 23, 2024
Back to Case Studies

Issue

Incorrect form events were tracked on the website, leading to inefficiencies in monitoring successful student application forms.

Solution

Developed and implemented a custom script based on the provided form events from Populi documentation to accurately track successful student applications and inquiry forms on the Won Institute of Graduate Studies website. This resolved the tracking issue and improved data accuracy for their team.

Achievement

Successfully Implemented custom script for Accurate Populi Form Event Tracking

Snippet/Screenshot/Link

Screenshot [LINK];

<script>
//window.dataLayer = window.dataLayer || [];
window.addEventListener('message', function(message) {
if (message.data.type === 'populi.inquiry.submitted') {
window.dataLayer.push({
'event': 'fx_inquirySubmitted',
'formDetails': message.data
});
console.log('Inquiry submitted event pushed to dataLayer');
}
if (message.data.type === 'populi.application.start') {
window.dataLayer.push({
'event': 'fx_applicationStart',
'formDetails': message.data});
console.log('Application start event pushed to dataLayer');
}
});
</script>