Hi @madhusudan_s ,
I would be cautious with the approach in your custom code. There will be a race condition around firing beacon and clearing the variables. Not sure how Launch handles this behind the sences, but Adobe's documentation suggests registering a clearVars() callback using registerPostTrackCallback(), reference .
This way you can ensure that the variables are only cleared after sending the beacon.
As a second note, once you've registered a callback, it is set until you make a new instance of the tracking object. That is, if you've defined "s" as the global tracking, App Measurement object, then registered the callback, all track calls will clear variables. If you don't want to have all calls clear the variables, you'll need to combine this method with something else that will either re-define the s object afterwards and/or use s_gi() to set a dummy object for this purpose, reference.
Oh, third thing, you probably want to pass the first parameter in tl() as true, to see if the delay is causing you an issue, reference.