/*
Plugin Name: Site Plugin for danix.xyz
Description: Site specific code changes for danix.xyz
+Plugin URI: https://danix.xyz
+Version: 0.7
+Author: Danilo 'danix' Macri
+Author URI: https://danix.xyz
*/
/**
* The google analytics code
*
*/
-function danix_google_anal() {?>
+function danix_google_anal() {
+ if ( function_exists('cn_cookies_accepted') && cn_cookies_accepted() ) { ?>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-23882460-1"></script>
<script>
gtag('config', 'UA-23882460-1');
</script>
<?php }
+}
add_action('wp_head', 'danix_google_anal', 10);
/**