Since your link tracking is getting cancelled, then it means that yes, you need to add a delay when you track the link. Otherwise, the browser is navigating away from the current web page before the link tracking has completed executing, causing it to be cancelled.
A 100ms - 500ms delay should be sufficient.