TimesApps Introduces New Features for Enhanced User Engagement
TimesApps has rolled out a suite of new functionalities designed to improve user interaction adn data tracking across its platforms. These updates focus on integrating marketing campaign data and user behavior analytics, particularly for its “toiplus” service.
The new features allow for the dynamic loading of Google gtag events and Facebook (Meta) Pixel events. This integration is contingent on specific campaign settings, namely `isGoogleCampaignActive` and `isFBCampaignActive`, which are managed through site settings. These settings determine whether the respective tracking scripts are initiated.
Moreover, the update includes the implementation of Survicate, a customer feedback and survey tool. The loading of the Survicate javascript is controlled by `allowedSurvicateSections`, a parameter that dictates which sections of the website are eligible for surveys.This ensures that user feedback is collected contextually.
The system is designed to adapt based on user subscription status. For non-prime users, campaign and tracking scripts are loaded directly based on pre-configured site settings. However, for prime users or when initial site settings are not available, the system retrieves these configurations from a remote endpoint at `https://jarvis.indiatimes.com/v1/feeds/toi_plus/site_settings/643526e21443833f0c454615?db_env=published`. this dynamic fetching mechanism ensures that the latest settings are always applied.
The Survicate integration includes a mechanism to set visitor traits, such as `toi_user_subscription_status` and `toi_user_geolocation`. These traits are populated with data from `window.isPrime` and `window.geoLocation` respectively. The `setVisitorTraits` function is called either directly if the Survicate object is ready or via an event listener for “SurvicateReady” to ensure proper initialization.
The `TimesApps.toiPlusEvents` function serves as the central point for managing these integrations. It checks for the availability of `toiplus_site_settings` and the status of active campaigns.If these are not readily available, it fetches them from the Jarvis API. The logic then proceeds to load the relevant tracking scripts and Survicate, tailoring the experience based on user type and available configuration data.