Tealium Load callback / event

Gold Contributor
Gold Contributor

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

2 REPLIES 2

Tealium Load callback / event

Tealium Employee

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).

Tealium Load callback / event

Gold Contributor
Gold Contributor

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

Public