function tryGaOptOut(args){ /* gaOptOut should have been defined by host */ if(typeof(gaOptOut)=='function'){ gaOptOut(); alert('Opt-out OK'); /* give feedback to user that opt-out has been performed */ }else{ /* gaOptOut is not defined. Just open args.href in another window (default behaviour) */ if(args){ if(args.href){ window.open(args.href); } } } }