Created
September 19, 2019 07:16
-
-
Save 7einhalb/db766165bebd8152fddcd92534d3b4a8 to your computer and use it in GitHub Desktop.
Shortcode für Google Analytics OptOut (Datenschützerklärung)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Google Analytics Opt-Out-Link */ | |
// Shortcode [gp_optout]link[/gp_optout] | |
function gaool_shortcode_optout( $atts, $content = null ) { | |
return '<a onclick="alert(\'Das Tracking durch Google Analytics wurde in Ihrem Browser für diese Website deaktiviert\');" href="javascript:gaOptout()">' . $content . '</a>'; | |
} | |
add_shortcode( 'gp_optout', 'gaool_shortcode_optout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment