- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
07-19-2023 10:55 AM
Hi,
I am trying to set utag_link after a user is on a page for 60 seconds. I am using this, but it sets it repeadedly every 60 seconds it seems.
Any ideas?
function setUtagLink(){
var setIt = function(){
utag.link(
{
tealium_event: 'timer60',
customLinkName: 'Link Name'
}
);}
var theTimout = setTimeout(setIt,60000);
}
setUtagLink();
08-08-2023 10:02 AM
After the function triggers in the timeout, you can clear the timeout and it won't trigger again.
https://www.w3schools.com/jsref/met_win_cleartimeout.asp
Copyright All Rights Reserved © 2008-2023