Title: integrate with gdpr plugin filter
Last modified: July 4, 2018

---

# integrate with gdpr plugin filter

 *  Resolved [nickfr](https://wordpress.org/support/users/nickfr/)
 * (@nickfr)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/)
 * here is a workaround for gdpr plugin and facebook pixel plugin
    can i use a filter
   in your plugin too? like pys_disable_by_gdpr
 *     ```
       /**
        * Disable Facebook Pixel based on Cookie Consent
        *
        * This snippet disables the Facebook Pixel Tracking Code based on the specific cookie settings.
        * @link https://wordpress.org/plugins/pixelyoursite/
        * @link https://wordpress.org/plugins/gdpr-cookie-compliance/
        */
       add_action( 'after_setup_theme', 'pixel_cookie_consent' );
   
       function pixel_cookie_consent() {
   
       	$cookie = ( isset( $_COOKIE['moove_gdpr_popup'] ) ) ? $_COOKIE['moove_gdpr_popup'] : false;
   
       	$cookie = stripslashes( $cookie );
       	$cookie = json_decode( $cookie, true );
   
       	// disabled by default	
       	add_filter( 'pys_disable_by_gdpr', '__return_true' );
   
       	// enabled based on user setting
       	if ( $cookie['thirdparty'] == 1 ) {
       		add_filter( 'pys_disable_by_gdpr', '__return_false' );
       	}
   
       }
       ```
   
    -  This topic was modified 8 years, 1 month ago by [nickfr](https://wordpress.org/support/users/nickfr/).
    -  This topic was modified 8 years, 1 month ago by [nickfr](https://wordpress.org/support/users/nickfr/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Conversios](https://wordpress.org/support/users/tatvic/)
 * (@tatvic)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/#post-10464239)
 * Hi Nick,
 * Thank you for writing to us!
 * It should work but it’s totally at your risk. You can definitely try this but
   our plugin will not responsible if something will not work or break the functionality
   after adding this.
 * Thanks & Regards,
 *  Thread Starter [nickfr](https://wordpress.org/support/users/nickfr/)
 * (@nickfr)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/#post-10466205)
 * pixel your site plugin says
    Plugins and themes can use pys_disable_by_gdpr filter
   to disable tracking. have you a similar filter to use it in the above function?
 *  Plugin Author [Conversios](https://wordpress.org/support/users/tatvic/)
 * (@tatvic)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/#post-10468161)
 * Hi Nick,
 * No, currently the plugin doesn’t have the similar filters in.
 * Regards,
 *  Thread Starter [nickfr](https://wordpress.org/support/users/nickfr/)
 * (@nickfr)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/#post-10468532)
 * please consider adding this feature.
    Many gdpr plugin use this function to block
   a plugin from loading scripts. Adding generic google script for ecommerce to 
   header is not always an option and your plugin is one way for many websites!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘integrate with gdpr plugin filter’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-e-commerce-for-woocommerce-store/assets/icon-256x256.
   gif?rev=2708061)
 * [Conversios – GA4, Google Ads & Meta Conversion Tracking with Product Feed for WooCommerce](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-e-commerce-for-woocommerce-store/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-e-commerce-for-woocommerce-store/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [nickfr](https://wordpress.org/support/users/nickfr/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/integrate-with-gdpr-plugin-filter/#post-10468532)
 * Status: resolved