Improved trackExternalLink handling