utag.track() method

astharawal
Visitor
astharawal

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 ?

 

Thannks

 

2 REPLIES 2
Highlighted

utag.track() method

UnknownJ
Occasional Contributor
UnknownJ Occasional Contributor

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:

utag.track({
  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

tamedbeast
Contributor
tamedbeast

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

#toodles

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