Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Premium
    February 08, 2023 @ 8:00 am

    Hi, the plugin Pixel Your Site loads the following cookies before consent:

    last_pys_landing_page
    last_pysTrafficSource
    pys_session_limit
    pys_landing_page
    pysTrafficSource
    pys_first_visit
    pys_start_session

    There is no option to block these cookies neither your plugin nor PYS. I’ve been looking for information but with no luck. Can you help me?

     

    Thanks in advance!

    Moove Agency
    February 08, 2023 @ 1:50 pm

    Hello,

    Thanks for using our plugins.

    You can try adding this code snippet to your functions.php:

    // compatibility between Pixel Your Site plugin and GDPR Cookie Compliance
    add_filter( 'pys_disable_by_gdpr', 'gdpr_cookie_compliance_pys' );
    function gdpr_cookie_compliance_pys() {
    	// checking if the GDPR Cookie Compliance plugin is activated and includes the latest function to check the cookies
    	if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
    		// reading the user preferences for 3rd party cookies, if it's accepted the gdpr_is_accepted returns true
    		$disable_pys = gdpr_cookie_is_accepted( 'thirdparty' ) ? false : true;
    		return $disable_pys;
    	endif;
    	// fallback if the GDPR Cookie Compliance plugin is not activated or the PHP cookie functions are not included in the current version
    	return true;
    }
    // force page reload 
    add_action( 'gdpr_force_reload', '__return_true' );

    Hope this helps.

    Premium
    February 14, 2023 @ 9:21 am

    Unfortunately, it doesn’t works. The cookies loaded before user accepts or rejects remains excactly the same:

    last_pys_landing_page
    last_pysTrafficSource
    pys_session_limit
    pys_landing_page
    pysTrafficSource
    pys_first_visit
    wptwa-widget-cache-89051-88778-108024-108027-108023-99878
    pys_start_session

    Any other idea?

    Thanks!!

    Moove Agency
    February 17, 2023 @ 11:06 am

    Hi Santiago,

    our engineers looked into this and found that the Pixel You Site plugin creates these cookie by default, these are “internal” cookies for PYS plugin, and not for third-party cookies.
    The Facebook pixel cookies are already blocked if the previous code snippet is added to your site.

    So we extended the snippet to block these “internal” Pixel You Site cookies too:

    add_filter( 'pys_disable_by_gdpr', 'gdpr_cookie_compliance_pys', 100 );
    function gdpr_cookie_compliance_pys() {
      if ( function_exists( 'gdpr_cookie_is_accepted' ) ) :
      $disable_pys = gdpr_cookie_is_accepted( 'thirdparty' ) ? false : true;
      return $disable_pys;
      endif;
      return true;
    }
    add_action( 'wp_enqueue_scripts', function() {
      if ( apply_filters( 'pys_disable_by_gdpr', false ) ) :
      wp_deregister_script('pys');
      endif;
    }, 100);
    add_action( 'gdpr_force_reload', '__return_true' );

    Hope this helps.

    Premium
    February 21, 2023 @ 9:03 am

    Ok, I already thought it was something like that but since there are hundreds of websites that report its use, I preferred to be safe. What happens now is that no pys cookie appears after accepting cookies. Perhaps it is best to let them load and report that they are merely functional cookies for the subsequent loading of third-party cookies, don’t you think?

    Thanks!

    Moove Agency
    February 21, 2023 @ 9:17 am

    Hi Santiago,

    Glad our answer helped.

    We can’t advise on how to implement cookie policy on your site as that’s outside of the scope of this support forum – every organisation needs to decide how to setup/treat cookies on their website.

    Hope this helps.

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘pixel your site’ is closed to new replies.