Plugin/MinificationPlugin.php
public function aroundGetExcludes(
        \Magento\Framework\View\Asset\Minification $subject,
        callable $proceed,
        $contentType
    ) {
        $result = $proceed($contentType);

        //Content type can be css or js
        if ($contentType == 'js') {
            $result[] = 'trackedlink.net/_dmpt.js';
            $result[] = 'trackedlink.net/_dmmpt.js';
        }

        return $result;
    }
public function aroundGetExcludes(
        \Magento\Framework\View\Asset\Minification $subject,
        callable $proceed,
        $contentType
    ) {
        $result = $proceed($contentType);

        //Content type can be css or js
        if ($contentType == 'js') {
            $result[] = 'trackedlink.net/_dmpt.js';
            $result[] = 'trackedlink.net/_dmmpt.js';
        }

        return $result;
    }
public function aroundGetExcludes ( \ Magento \ Framework \ View \ Asset \ Minification $ subject , callable $ proceed , $ contentType ) { $ result = $ proceed ( $ contentType ) ; //Content type can be css or js if ( $ contentType == 'js' ) { $ result [ ] = 'trackedlink.net/_dmpt.js' ; $ result [ ] = 'trackedlink.net/_dmmpt.js' ; } return $ result ; }
Exclude external js from minification

@param \Magento\Framework\View\Asset\Minification $subject
@param callable $proceed
@param string $contentType

@return array
Exclude external js from minification