Basic State Definition – DOM Ready State
The most basic use case for a state is the DOMContentLoaded event handle. This will create a JENTIS State in your JTM account that activates on the named web browsers event. Further details on this api and specs can be found here: DOMContentLoaded event – Web APIs | MDN
function(initState) {
document.addEventListener('DOMContentLoaded', (event) => {
initState();
});
};
With this State in place, your DCP will react as soon as the event is triggered in a user's browser, activating all triggers, checking conditions, and calculating all Frontend Variable values. So, with this state, you are ready to go if this event fits your requirements.
\
Last updated
Was this helpful?