- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
Hi everyone,
In a single page application I occasionally have the problem that the function utag.view is not yet defined when called. So my question is if there is any callback or JavaScript CustomEvent that signals when the tealium library loaded successfully?
Cheers
Solved! Go to Solution.
Hi @MountainMaster
There isn't an official callback as such, but you can add one yourself if you want!
Even when you have "noview" setup to not fire the default view event, the "before load rules" extensions still run, you could add a javascript extension here to fire a function of your choosing
Something as simple as
Title: onLoad
Scope: Before Load Rules (run once)
Code: myCallbackFunction()
with myCallbackFunction being defined within your own webcode
Or some variation of this anyway.
You can play around with the scope a bit too, ALR may work for you, as may DOM Ready (though may be a bit slow for your liking).
11-11-2020 12:47 AM - edited 11-11-2020 12:50 AM
Thank you for your fast reply.
I didnt know that there are extension scopes that still run with the "noview" config, but that sounds like a good solution :)
Greetings
Copyright All Rights Reserved © 2008-2023