Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

CREATING S.TL() 500ms DELAY WHEN NOT PASSING LINK OBJECT

MJ_1963
Level 3
Level 3

I was wondering what is the best method to still have the 500ms delay for an s.tl() call when no link object is passed? If I still pass 'this' and it doesn't reference anything, will it still have the 500 ms delay?Just want to know how I still initiate the 500 ms delay when link object is not present? Example:

function trackNoLinkObj(partnerID){
    s.events=s.linkTrackVars=s.linkTrackEvents = "";
    s.linkTrackVars = "prop1,prop2";
    s.linkTrackEvents = "None";
    s.tl(this,'o',partnerID);
};

Thanks!

1 Accepted Solution
AlexisCazes
Correct answer by
Community Advisor
Community Advisor

If it is not a link you should not use this for the first param in the s.tl function but true.

And to wait 500ms use preventDefault in Jquery then send the s.tl call then set a timeout of 500ms to wait to move to the location. 

If you do not reload the page then you do not need to wait 500ms

View solution in original post

1 Reply
AlexisCazes
Correct answer by
Community Advisor
Community Advisor

If it is not a link you should not use this for the first param in the s.tl function but true.

And to wait 500ms use preventDefault in Jquery then send the s.tl call then set a timeout of 500ms to wait to move to the location. 

If you do not reload the page then you do not need to wait 500ms

View solution in original post