Reply
Highlighted

Single Page App: Difference between 'link' and 'view' ?

Hello,

 

I'm working on a proof of concept with a single page app implemented with angular 4 and its router.

In the app, the state of the applications is stored in a single object which I'm able to observe in order to send the 'view' tracking. I'm basicaly sending most of my application state with the 'view'.

But what variables should I send when a user click on a link ? 

In order to achieve the link tracking, the application observes the router state. One thing that I could send is the new URL. But what about all the other variables from the application state ? Should I send them too ?

 

I'm a bit confused, and I dont really see a big difference between 'view' and 'link'. So what is the difference ?

Thanks,

Reply
0 Kudos
Visitor
Posts: 1
Registered: Thursday

Re: Single Page App: Difference between 'link' and 'view' ?

[ Edited ]

Hi @martincgi. Both utag.view and utag.link are syntactic sugar for utag.track. The major difference in behavior between the two is going to be in how the tag templates will handle the event.

 

# Keeping it simple:
From an app design perspective, there are two ways that a user interacts
with a page. By viewing it (I'm looking at a page) and by interacting with it
somehow (i clicked on something). Many of the tag templates in TIQ will take on
different behavior based on the type of user interaction that you pass in. A
view event might trigger events like google's ga('send', 'pageview') or
facebook's fbq('track', 'PageView'). While a click event might fire a ga('send', 'event').


The two events exist so that we can create logic inside TIQ to handle this sort
of behavior. Additionally, much of the 'auto' stuff that TIQ enables is
preconfigured to work with this logic.

 

#What you should pass in:
You're thinking about it in a right way. On a link or user interaction event,
you should be passing in data that is related to the state of the app at the moment
the click happened. Most likely this set of data will overlap in many ways
with the data that you feel you should be passing on a 'view' event. But it may not.
Try and think about what is important for you to build the best model of what the user
was doing and how your app was behaving at the moment the user interaction occurred.

 

 

Tealium Employee
Posts: 14
Registered: ‎08-16-2016