/*Función GDPR*/ if (!is_admin()){ if ( function_exists( 'gdpr_cookie_is_accepted' ) ) { /* supported types: 'strict', 'thirdparty', 'advanced' */ /*Analítica*/ if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) { ?> <script> dataLayer = [{ 'cookies_analitica': 'granted' }]; </script> <?php } else { ?> <script> dataLayer = [{ 'cookies_analitica': 'denied' }]; </script> <?php } /*Marketing*/ if ( gdpr_cookie_is_accepted( 'advanced' ) ) { ?> <script> dataLayer.push({ 'cookies_marketing': 'granted' }); </script> <?php } else { ?> <script> dataLayer.push({ 'cookies_marketing': 'denied' }); </script> <?php } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter