utag.track() method

Bronze Contributor
Bronze Contributor

Hi Team,

I want to understand the functionality of utag.track. To my understanding ,for web applications we use utag.link for link tracking and utag.view to see page views. Can you confirm if utag.track is necessary for tracking mobile applications ?





utag.track() method

Tealium Expert
Tealium Expert

Hi @astharawal,

In reality, utag.view and utag.link are just wrappers around utag.track.

The function definitions are effectively:

utag.view  = function(payload, callback, tag_ids){ ... };
utag.link  = function(payload, callback, tag_ids){ ...};
utag.track = function(event_type, payload, callback){ ... };

So utag.track("view",utag.data) is equivalent to utag.view(utag.data). The only difference is if you want to pass a set of tag IDs into utag.track, in which case you need to invoke it thus:

  event: event_type,
  data: payload,
  cfg: {
    cb: callback,
    uids: tag_ids

So if you wanted to create event types outside of view and link, you could use utag.track to invoke those.


utag.track() method


OOOOooooo @astharawal. I'd accept @UnknownJ's answer as a solution! #hinthint #winkwink


If you liked it then you should have put a kudo on it!