- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
05-30-2018 06:03 AM - edited 05-30-2018 08:07 AM
Pageview call are made on a SPA using utag.view manually from the application and it is working properly.
exact code : $window.utag.view(udo)
where udo is data object
page_name: pageName, //Page Name
site_name: 'xyz', //Website Name
subsite_name: 'abc', //Subsite Name
but this data in udo is not present in utag.data when I am trying to console utag.data
Is there something that i am missing
Solved! Go to Solution.
05-30-2018 09:16 AM - edited 05-30-2018 09:17 AM
Hi @VijayYadav - this is a classic situation, especially where SPA is concerned.
The short answer is that the variables "tossed into the air" into the UDO on a tag.view() call are transient. They exist for the brief instant when the call is made and tag processing is in progress. You can see them if you put Tealium into debug mode and also when you run the browser debugger as well.
Let us know how it goes - come back with questions and ideas as needed!
05-31-2018 07:03 AM - last edited on 05-31-2018 07:39 AM by kathleen_jo
Data sent with pageview is present in utag.data only for instance when the pageview calls are made. After that the data is removed from utag.data.
As per the requirement I want to send this data(data sent along with pageview) along with events as well but I am not able to find it in utag.data.
What is the best practice for such type of task any idea, @mitchellt?
Is there some object available in tealium that can be used to fetch the data that was sent along with pageview call?
05-31-2018 10:32 AM
As @mitchellt says, when you pass data within utag.view it's event scoped meaning it's only available while that call occurs. If you declare
utag.data.page_name first that will make it global then it will be available for all future
utag.data.page_name = 'pageName'; //Page Name
utag.data.site_name = 'xyz'; //Website Name
utag.data.subsite_name = 'abc'; //Subsite Name
utag.data.user_auth = varValue;
Please let me know if this is what you're looking for.
06-01-2018 06:44 AM - edited 06-01-2018 06:46 AM
I agree with the above answer.
But I want the data sent with utag.view() call to be available in utag.data while i am making utag.link() call on the same page.
Note : It is an angular 1.5 application
And same thing was achieved on other angular 1.5 app but dont know how.
After the utag.view() call I was able to see the data in utag.data object when I logged it in console on the other application
06-01-2018 07:37 AM
@VijayYadav you should be good to go then. The data will still be available in utag.link calls as long as you pass in the utag.data object as the parameter. Are you making a general statement that's how you want it to work, or are you making the statement that it's not working this way? Just want to clarify so I can be sure your question is fully answer.
06-01-2018 07:56 AM - edited 06-01-2018 08:07 AM
Udo which i am sending with utag.view (I have mentioned in above post) is not available in utag.data after the view call is processed. So I am not able to use it for utag.link calls.
I am passing some data in utag.link() calls and in addition to that i also want to append global data(udo-view calls) to it before making the actual call but the global data is not available in utag.data.
Please let me know if you need more clarity.
06-01-2018 08:36 AM
@VijayYadav I hope the below description is useful.
1) On page load, I check the value of
utag.data.abc and it is
2) So I declare a globlal
utag.data.abc and set the value to
3) I trigger a
utag.view(utag.data) and view a request that captures the entire UDO and see
"abc":"123" is sent. Notice below the highlighted text that you can verify this is a view event.
4) I trigger a
utag.link(utag.data) and view a new request that captures the entire UDO and still see
"abc":"123" is sent. Notice below the highlighted text that you can verify this is a link event.
So by first declaring the var within the global
utag.data object and then triggering a utag.view or utag.link the data will be available.
If this doesn't solve your issue then I'll need detailed examples of the code you're using to see where the breakdown is occurring. Thanks!
06-04-2018 03:29 AM
I Know that if we add data in utag.data at the time of utag.view() calls it will be available in successive calls.
Here the case is different.
1. I am making a call to utag.view(somedataobj) //somedataobj is not utag.data
-tag fires correctly and somedataobj was available in utag.data while the view call was processing.
2. After that I want to make a utag.link(otherdataobj) on the same page //here otherdataobj will contain event specific data and few values of somedataobj
But those values(somedataobj) was not available in utag.data at the time of utag.link()
Question: Is this possible to persist the data which was sent in utag.view() calls without manually hardcoding it in utag.data?
06-04-2018 08:26 AM
Thanks for the clarification and details, this helps a lot.
In your example, it is correct that the Tealium library will not persist somedataobj since it's local to the utag.view.
It will require additional code to be able to persist somedataobj into utag.data. For example, utag.ut.merge is a function you can call just before a utag.view/link request to merge together the two objects. Hopefully this is more along the lines of what you're looking for.
06-05-2018 03:32 AM
Wasn't aware of utag.ut.merge. That sounds like it would have been a useful one for quite a lot of stuff I've done with SPAs in the last year.
Copyright All Rights Reserved © 2008-2023