public_html/wp-content/plugins/google-document-embedder/functions.php
/**
 * Google Analytics Integration
 *
 * @since   2.5.0.1
 * @return  string GA tracking event tag, or blank if disabled
 */
Google Analytics Integration
@since   2.5.0.1
@return  string GA tracking event tag, or blank if disabled
Google Analytics Integration @since 2 . 5 . 0 . 1 @return string GA tracking event tag or blank if disabled
function gde_ga_event( $file ) {
	global $gdeoptions;
	if ( $gdeoptions['ga_enable'] == "no" ) {
		return '';
	} elseif ( $gdeoptions['ga_enable'] == "compat" ) {
		$fnp = gde_split_filename( basename( $file ) );
		$category = "'Download'"; 
		$action = "'" . strtoupper( $fnp[1] ) . "'";
		$label = "this.href";
	} else {
		$category = "'" . addslashes( $gdeoptions['ga_category'] ) . "'";
		$action = "'" . __('Download', 'google-document-embedder') . "'";
		if ( $gdeoptions['ga_label'] == "url" ) {
			$label = "this.href";
		} else {
			$label = "'" . basename( $file ) . "'";
		}
	}
	$str = "_gaq.push(['_trackEvent', ".$category.", ".$action.", ".$label."]);";
	return " onClick=\"" . $str . "\"";
}
function gde_ga_event ( $ file ) { global $ gdeoptions ; if ( $ gdeoptions [ 'ga_enable' ] == " no " ) { return '' ; } elseif ( $ gdeoptions [ 'ga_enable' ] == " compat " ) { $ fnp = gde_split_filename ( basename ( $ file ) ) ; $ category = " 'Download' " ; $ action = " ' " . strtoupper ( $ fnp [ 1 ] ) . " ' " ; $ label = " this.href " ; } else { $ category = " ' " . addslashes ( $ gdeoptions [ 'ga_category' ] ) . " ' " ; $ action = " ' " . __ ( 'Download' , 'google-document-embedder' ) . " ' " ; if ( $ gdeoptions [ 'ga_label' ] == " url " ) { $ label = " this.href " ; } else { $ label = " ' " . basename ( $ file ) . " ' " ; } } $ str = " _gaq.push(['_trackEvent',  " . $ category . " ,  " . $ action . " ,  " . $ label . " ]); " ; return "  onClick= \" " . $ str . " \" " ; }
Google Analytics Integration
 @since   2.5.0.1
 @return  string GA tracking event tag, or blank if disabled
Google Analytics Integration @since 2 . 5 . 0 . 1 @return string GA tracking event tag or blank if disabled
// intentionally not translated (it wasn't a translated string in < 2.5)