- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
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
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.
OOOOooooo @astharawal. I'd accept @UnknownJ's answer as a solution! #hinthint #winkwink
#toodles
Copyright All Rights Reserved © 2008-2023