Need to Load Scripts Using Async on Frontend Pages Only

I have a script that loads a certain plugin’s javascript using async. Unfortunately, this is breaking the backend of this plugin. I would like to apply the script below to only load async on frontend pages. How can I do that? This could be a modification that says, only run if NOT /wp-admin/

Thanks for your help,



/*function to add async and defer attributes*/
function defer_js_async($tag){

$scripts_to_async = array('zones.js', 'sg-analytics.js', 'jssocialsshares.js', 'SGMB.js', 'simpledropdown.js', 'jquerysgmbSimplePopup.js');

#async scripts
foreach($scripts_to_async as $async_script){
if(true == strpos($tag, $async_script ) )
return str_replace( ' src', ' async="async" src', $tag );
return $tag;
add_filter( 'script_loader_tag', 'defer_js_async', 1 );