Advertisement
swte

GA Bypass GDPR tweak

Nov 2nd, 2020
1,070
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Plugin Name: Swift GA Bypass GDPR
  4.  */
  5.  
  6. add_filter('swift_performance_option_cookies-disabled', function($value){
  7.     if (isset($_COOKIE['GDPR-cookie-name']) && $_COOKIE['GDPR-cookie-name'] == 'desired-value'){
  8.         return 0;
  9.     }
  10.     return 1;
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement