New Delhi, India – A recent update to the TimesApps JavaScript code introduces enhanced tracking and engagement capabilities for Times Internet‘s digital properties, particularly focusing on user subscription status and geolocation data. The changes aim to refine the delivery of marketing campaigns and user feedback mechanisms across various platforms.
The updated script,designed to be integrated into Times Internet’s websites,includes functionalities for loading Google Tag Manager (gtag.js) events and Facebook Pixel (fbevents.js) events. These are contingent on specific campaign settings, namely `isGoogleCampaignActive` and `isFBCampaignActive`, respectively. These settings are retrieved either from a pre-existing `toiplus_site_settings` object within the `window`’s global scope or fetched dynamically from a “Jarvis” API endpoint if the initial configuration is not available or if the user is not identified as a prime subscriber.
A notable addition is the integration of Survicate,a customer feedback and survey platform. The script conditionally loads the survicate JavaScript library based on the `allowedSurvicateSections` configuration. This configuration is determined by whether the user is accessing a prime user layout or a standard layout, allowing for targeted survey deployment. The Survicate integration also includes a mechanism to set visitor traits,such as `toi_user_subscription_status` and `toi_user_geolocation`,which are crucial for personalizing user experiences and analyzing campaign effectiveness. The script ensures Survicate is initialized correctly by listening for a `SurvicateReady` event if the library is not immediately available.
The `TimesApps.toiPlusEvents` function serves as the primary entry point for this new functionality. It orchestrates the loading of the tracking and engagement scripts based on the availability and values of site settings and user subscription status. This modular approach allows for flexible campaign management and user data collection, supporting Times Internet’s strategy to optimize user engagement and marketing outreach.