Highlighted

SPA Utag Code Loading

LeoZhuo
Visitor
LeoZhuo

Hi,

I want to ask how to load utag code in different page which is using SPA. Because I am using extension and configue the loading rules is one of the URL. But it didn't work because the utag code can't reload when I landing another page. How to solve this problem? Many thanks.

2 REPLIES 2

SPA Utag Code Loading

ahrasch
Frequent Visitor
ahrasch
I am not sure if I understand your problem, but you can find the guide to the Tealium implementation for SPA here: https://community.tealiumiq.com/t5/JavaScript-utag-js/Page-Tracking/ta-p/15563#toc-hId--445688209

Instead of loading the utag script again you can call utag.view() to trigger an vew pageview.

SPA Utag Code Loading

LeoZhuo
Visitor
LeoZhuo

Hi @ahrasch,

So I need to add below code before utag.js load ?

window.utag_cfg_ovrd = window.utag_cfg_ovrd || {};
window.utag_cfg_ovrd.noview = true;

 Now I have some script and want them to works in different step of the singel application page. But after I add them in extensions, they only load once when I refresh the page. The next coming page seems not reload again.

So if I add the code above, every step of page will reload the utag.js? (utag extensions)