I need some help to low-key reverse engineer a part of one of our web properties.
Tealium fires on the first 'hit' when a visitor arrives on this site: http://community.active.com
But, click a link and after the page loads, Tealium has not fired the second time. Click another link and again Tealium doesn't fire. What's missing? What DOM event is missing that Tealium can't detect the page has changed?
There are no hashtags on the URLs of this site; nevertheless I tried adding an onhashchange lister and also tried an onpopstate listener (which worked only when using browser back or forward buttons) to little avail.
Thanks in advance for some ideas beyond having the developers adding manual utag.view() calls. There must be some alternatives!
07-25-2017 10:59 AM - edited 07-25-2017 11:00 AM
You can use a jQuery onHandler extension, configure a jQuery selector for the link (or element) that you want to track and trigger a "view" to fire a virtual page view, or a "link" to fire a link event.
Depending on the tag that you want to track this for, you may need to set/populate a certain UDO variable.
e.g. Set "event_category" to equal "button", "event_action" to equal "click for Google Analytics event tracking, using a "link" trigger
e.g. Set "page_name" to equal "Quick View Product Page" for Google Analaytics page tracking, using a "view" trigger
For tracking virtual page views, you may want to be doing "AJAX tracking". If so, please read up on this here (https://community.tealiumiq.com/t5/iQ-Tag-Management/AJAX-Tracking-in-Tealium/ta-p/14034)
Does this help?
Thanks for the reply and ideas @meng_lim, but I still don't understand what distinguishes the example site from a "regular" site where Tealium fires on each page view with no additional work. Can you give me some suggestions what to look for? I'd prefer more technical than less technical so I can really learn/understand all the issues with tracking newer sites.
@mitchellt The site at community.active.com is a Single Page Application (SPA), which means the browser does not reload on each page view. On a more traditional website where each page causes a browser reload, utag.js is loaded each time and a tracking call is made automatically. In a SPA utag.js is loaded only once and all subsequent page tracking calls must be made explicitly by the application itself using
utag.view(). This means the developers must update the application to trigger a tracking call whenever a new page is viewed. More info on utag.view: Tracking with utag.view and utag.link