javascriptjqueryanalyticstealium

Use of Tealium's utag.view and/or utag.link for dynamically loaded elements


This may be a long shot but I'm looking for someone who has worked with the Tealium UDO (Universal Data Object). I have a search page with a Google Search Appliance, my utag_data object in the data layer that looks like this:

var utag_data = {
   "country":"US",
   "language":"EN",
   "search_keywords": "blahblah",
   "search_results": "0"
}

The problem here is the search_results property has not had enough time to wait for the real results number to load so it is defaulting to 0 instead of the real number 1200. I've read Tealium's documentation around the utag.view() and utag.link() and want to use one of these to update the search_results tag. I tried:

utag.link({'search_results':'1200'}); 

and

utag.view(utag_data,null,[12]); 

where 12 is the UID of the tag in Tealium but when using Omnibug in firefox I'm not seeing any updated values, but it is sending the click event to AT Internet.

Does anyone have any experience with this? Thank you in advance


Solution

  • You can either wait to call the main utag.js Tealium script, or send along another data point using utag.link or utag.view. It is not possible to "update" the initial utag_data object once sent.

    These methods are used to handle sending dynamic events/data. See additional discussion on the Tealium blog at ajax tracking.. when urls no longer change

    From utag.link() and utag.view() on Tealium Learning

    Syntax

    The link and view methods allow you to pass three different parameters:

    Notes: