TimesApps Introduces Enhanced Campaign Tracking and User Engagement tools
TimesApps has rolled out a new feature, `toiPlusEvents`, designed to bolster campaign tracking and user engagement across its digital platforms. This update integrates Google Ads (gtag) and Facebook (FB) event tracking, alongside the Survicate customer feedback platform, to provide a more comprehensive understanding of user behavior and campaign effectiveness.
The `toiPlusEvents` functionality dynamically loads tracking scripts based on site configurations and user status. if site settings are readily available and the user is not identified as a prime subscriber, the system directly activates Google and Facebook event tracking and loads the Survicate JavaScript. This ensures immediate data capture for ongoing campaigns.
In scenarios where initial site settings are not accessible or the user is identified as a prime subscriber, `toiplus_site_settings` are fetched from a designated Jarvis API endpoint. This data-driven approach allows for tailored campaign tracking and feedback mechanisms.The system intelligently selects the appropriate Survicate sections to monitor based on whether the user is accessing content through a prime user layout or a standard layout.
The Survicate integration,specifically,is configured to capture user traits such as subscription status and geolocation.The geolocation data defaults to ‘IN’ (india) if not or else determined by the user’s `window.geoinfo.CountryCode`. The `setVisitorTraits` method is utilized to pass this data, ensuring that user feedback and campaign targeting are informed by relevant contextual data.
The implementation ensures that the necessary JavaScript for Survicate is loaded asynchronously. A script element is dynamically created and appended to the document’s head, referencing the Survicate workspace URL. This method of script loading prevents blocking of the page’s rendering, optimizing the user experience.
The `TimesApps.toiPlusEvents` function serves as the central point for initializing these tracking and engagement features. It is designed to be flexible, adapting its behavior based on the availability of configuration data and the user’s subscription status, thereby providing a robust framework for digital marketing and user experience analysis.