Salient Process, a leading process management and automation firm, wanted to enhance its understanding of user engagement on its platform. The primary goal was to differentiate between free and paid users immediately after login, based on the presence of a banner indicating trial period information.
The key challenge was to design a non-intrusive, privacy-respecting system that accurately classifies users without affecting the site’s performance or user experience. Additionally, the system must be robust enough to avoid duplicate event tracking within the same session or subsequent logins.
A custom JavaScript solution was implemented via Google Tag Manager (GTM) that detected the trial period banner and categorized users accordingly, firing a tracking event once per session to Google Analytics 4 (GA4). This was done without the use of user identifiers or cookies. This script achieves the following;
For technical marketers and analytics professionals, this case study reinforces the importance of:
This solution has proven to be a low-impact yet highly effective way to gather critical user data for Salient Process. It can serve as a blueprint for similar tracking needs.
Successfully tracked user types (free or paid) upon login for the Salient Process using banner detection, leading to better user segmentation.
<script>
// Function to check if the user is free or paid
function checkUserType() {
var bannerText = document.querySelector('#expiryInfo');
if (bannerText && bannerText.innerText.includes("Your Trial Expires in")) {
return 'free';
} else {
return 'paid';
}
}
// Event trigger based on user type
var userType = checkUserType();
var eventType = userType + '_user_login'; // Constructs the event type string
// Since the login process triggers a page reload or navigation,
// we can use the session storage to ensure the event only fires once per session
if (!sessionStorage.getItem(eventType)) {
// Push event to GTM dataLayer
dataLayer.push({'event': eventType});
// Store in the session storage that we've fired this event type
sessionStorage.setItem(eventType, 'fired');
}
</script>