TimesApps Integrates Enhanced User engagement Tools for TOI Plus Subscribers
timesapps has rolled out a new integration designed to boost user engagement for its TOI Plus subscribers.The update introduces functionalities for tracking user subscription status and geolocation, leveraging tools like Google Tag Manager (gtag.js),Facebook Pixel (fbevents.js), and Survicate for user feedback.
The new system allows for the dynamic setting of visitor traits, including `toi_user_subscription_status` and `toi_user_geolocation`. The country code for geolocation is steadfast by `window.geoinfo.CountryCode` if available, defaulting to ‘IN’ otherwise. These traits are crucial for personalizing user experiences and tailoring marketing campaigns.
The integration ensures that these engagement tools are loaded efficiently. If the `_sva` object and its `setVisitorTraits` method are available on the `window` object,the attributes are set promptly. If not,an event listener for “SurvicateReady” is established to trigger the attribute setting once the Survicate script is ready.
The Survicate JavaScript snippet, sourced from `https://survey.survicate.com/workspaces/0be6ae9845d14a7c8ff08a7a00bd9b21/web_surveys.js`, is asynchronously loaded into the document to minimize impact on page load times.
The `TimesApps.toiPlusEvents` function serves as the central point for this integration.It checks for the availability of site settings,specifically `toiplus_site_settings`,and flags for active Google and Facebook campaigns. If these settings are present and the user is not a prime subscriber, it proceeds to load the respective campaign tracking scripts and Survicate, based on `allowedSurvicateSections`.
In scenarios where the initial site settings are not available or if the user is identified as a prime subscriber,the system fetches updated site settings from a specified Jarvis API endpoint: `https://jarvis.indiatimes.com/v1/feeds/toi_plus/site_settings/643526e21443833f0c454615?db_env=published`. The response from this API determines which campaign tracking and Survicate functionalities are activated. For prime users, the `allowedSurvicatePrimeSections` are considered, while for others, `allowedSurvicateSections` are used.
This comprehensive approach aims to provide TimesApps with deeper insights into user behavior and preferences, enabling more targeted content delivery and campaign management for its TOI plus audience.