- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi Team,
I am trying to fire Virtual page on my demo website" eonlineshop.ga" by suppressing defaul page view but with no success . I have gone through various article on the subject but with no luck.
I have followe below procedure for setting up a virtual page tracking
1) Added below code above utag script
<script type="text/javascript">
window.utag_cfg_ovrd = {noview : true};
</script>
<!-- Loading script asynchronously -->
<script type="text/javascript">
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/training.help.train/eonlineshop/prod/utag.js';
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();
</script>
Then added following code
<script type="text/javascript">
utag.view({
"page_type" : "checkout",
"page_name" : "Select Payment Option"
});
</script>
I am getting error "utag not define "
Updated code
<script type="text/javascript">
window.callTealiumView = function(){
if (typeof utag !=="undefined" && typeof utag.view==="function"){
utag.view({
"page_type" : "checkout",
"page_name" : "Select Payment Option"
});
} else {
window.setTimeout(callTealiumView, 300);
}
}
</script>
<script type="text/javascript">
window.callTealiumView();
</script>
Even used tealium_event functionality but still no luck .
Can anybody help
Hi Mymailavez,
You will need to declare the UDO object before using the async script. Please reverse the scripts and it will do the trick.
<script type="text/javascript">
utag.view({
"page_type" : "checkout",
"page_name" : "Select Payment Option"
});
</script>
<!-- Loading script asynchronously -->
<script type="text/javascript">
(function(a,b,c,d){
a='//tags.tiqcdn.com/utag/training.help.train/eonlineshop/prod/utag.js';
b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true;
a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
})();
</script>
Thanks,
Charul
03-20-2019 02:13 PM - edited 03-20-2019 02:25 PM
Hi @mymailavez ,
Can you try like below
<script type="text/javascript">
(function(){utag.view({
"page_type" : "checkout",
"page_name" : "Select Payment Option"
});})
</script>
Copyright All Rights Reserved © 2008-2023