Home » Sport » IND vs ENG Live Score, 5th Test Match Day 4: Mohammed Siraj removes Ollie Pope; India 6 wickets away from win vs England

IND vs ENG Live Score, 5th Test Match Day 4: Mohammed Siraj removes Ollie Pope; India 6 wickets away from win vs England

by Alex Carter - Sports Editor

New Delhi, India – Teh Times of india has implemented a new javascript code snippet designed to enhance user engagement and data collection across its digital platforms. This update aims to personalize user experiences and track campaign effectiveness through integrations with Google Analytics, Facebook Pixel, and Survicate, a customer feedback platform.

The core functionality of the script involves dynamically loading tracking scripts based on user subscription status and campaign activity. Specifically, it checks for the presence of `toiplus_site_settings` and flags like `isFBCampaignActive` and `isGoogleCampaignActive` within the `window.f` object. If these settings are available and the user is not a Prime subscriber, it triggers the loading of Google Tag Manager (gtag.js) and Facebook Pixel events.

For Survicate integration, the script checks `f.toiplus_site_settings.allowedSurvicateSections`. If Survicate is not yet initialized, it adds an event listener for the `SurvicateReady` event to ensure proper attribute setting. The Survicate script itself is loaded from `https://survey.survicate.com/workspaces/0be6ae9845d14a7c8ff08a7a00bd9b21/web_surveys.js`.

In scenarios where the initial configuration is not available or the user is a prime subscriber, the script fetches site settings from a dedicated Jarvis API endpoint: `https://jarvis.indiatimes.com/v1/feeds/toi_plus/site_settings/643526e21443833f0c454615?db_env=published`. The response from this API determines which tracking scripts and Survicate sections are activated. The selection of Survicate sections is further refined based on whether the user is experiencing a Prime user layout (`window.isPrimeUserLayout`).

The `TimesApps.toiPlusEvents` function serves as the primary entry point for this new tracking mechanism. It is designed to be called with a configuration object, although the provided snippet directly accesses global variables and the `window.f` object. The script also includes provisions for setting visitor traits within Survicate, such as `toi_user_subscription_status` and `toi_user_geolocation`, when the Survicate object and its `setVisitorTraits` method are available.

This initiative reflects a broader trend in digital publishing to leverage data for a more tailored and effective user experience, while also providing publishers with deeper insights into campaign performance and user sentiment. The integration of multiple tracking and feedback tools suggests a strategic effort to unify data streams and enhance marketing and product progress efforts.

You may also like

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.