Title: Cookies being set before customer consent
Last modified: August 9, 2025

---

# Cookies being set before customer consent

 *  [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [8 months ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/)
 * We use the woocommerce plugin for facebook and cookiebot on our site.
 * Recently, the ICO has audited our site and found that the `_fbq` cookie was being
   set on the site before the customer had opted in to cookies.
 * Our integration of cookiebot is hardcoded to the top of the site, as recommended
   by them, so it’s the first JS firing.
 * Still, the `_fbq` pixel is being set.
 * They have a further guide, specific for facebook that can be found here [https://support.cookiebot.com/hc/en-us/articles/360004461894-Require-consent-before-loading-Facebook-pixel](https://support.cookiebot.com/hc/en-us/articles/360004461894-Require-consent-before-loading-Facebook-pixel)
   and instructs to remove noscript, something that’s not currently possible with
   the default fb plugin.
 * The ICO is threatening us with a fine if we don’t get this resolved ASAP.
 * I suspect this issue would be present to most of your clients using this plugin
   and cookiebot, possibly also cookieyes and other cookie platforms, so those clients
   are probably also likely to receive threats and fines from the ICO if they ever
   get audited.
 * In theory, this could also be caused by Cloudflare, but this is yet another standard
   platform that  many people use.
 * Unless this issue is raised with website owners, I don’t think anyone will realise.
   They’ll just rely on Cookiebot and think everything is fine until they get audited.
 * To resolve this issue, we had to hardcode the following changes
    1. Remove noscript
    2. Added `fbq('consent', 'revoke');`
    3. Added `window.addEventListener('CookiebotOnConsentReady',function(e){
          fbq('
       consent',Cookiebot.consent.marketing?'grant':'revoke')},!1)
 * In WC_Facebookcommerce_EventsTracker we need to be able to remove the actions,
   and add our own, or we need to be able to edit the output from those two functions
    - add_action( ‘wp_head’, array( $this, ‘inject_base_pixel’ ) );
    - add_action( ‘wp_footer’, array( $this, ‘inject_base_pixel_noscript’ ) );

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

 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18605342)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/),
 * Thanks for reaching out, and sharing such a detailed report!
 * Regarding the overall Cookie setup/customization via the plugin, it’s best to
   follow the official [GDPR guide](https://developers.facebook.com/docs/meta-pixel/implementation/gdpr/)(
   which I can tell you have respected with the changes you made).
 * We also have an update in the works that will simplify how consent is handled
   within the plugin, and we expect it to be released in the coming weeks.
 * Kind regards,
   Marija
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18605376)
 * Hi [@marijastuntcoders](https://wordpress.org/support/users/marijastuntcoders/),
 * We use the WP plugin to integrate Facebook, thinking that everything is taken
   care of without any dev/tech knowledge, however this is not currently the case
   and a developer is needed.
 * Are you saying that soon, the plugin will become fully compliant out of the box
   in a few weeks?
 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18606391)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/),
 * With the update, the plugin will support consent rejection (ie handle revocation)
   out of the box.
 * Kind regards,
   Marija
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18608519)
 * Hello, can you please confirm if this was meant to be resolved in Version 3.5.6
   that was released a few hours ago, or will it be part of a future update?
 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [7 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18609576)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/),
 * The update is not a part of release 3.5.6, it will be released in a future update.
 * Kind regards,
   Marija
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [7 months ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18639479)
 * Hi [@marijastuntcoders](https://wordpress.org/support/users/marijastuntcoders/),
 * I notice the update is not part of release 3.5.7 either so we need to hardcode
   the change again.
 * Can you please point us to the related github issue?
 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18642149)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/)–
   there isn’t an active thread referencing this issue, please feel free to open
   a new one [here](https://github.com/facebook/facebook-for-woocommerce/issues).
 * Kind regards,
   Marija
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [6 months, 4 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18642194)
 * [@marijastuntcoders](https://wordpress.org/support/users/marijastuntcoders/) 
   I’m sorry i don’t understand what you’re saying.
 * You previously said “_We also have an update in the works that will simplify 
   how consent is handled within the plugin, and we expect it to be released in 
   the coming weeks._“. Where is this being worked on??
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18646966)
 * [@marijastuntcoders](https://wordpress.org/support/users/marijastuntcoders/)
 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18648457)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/),
 * The update is still being worked on by the Dev team, we will be sure to update
   this thread once it is released.
 * Kind regards,
   Marija
 *  Thread Starter [George](https://wordpress.org/support/users/subscriptiongroup/)
 * (@subscriptiongroup)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18648535)
 * Hi [@marijastuntcoders](https://wordpress.org/support/users/marijastuntcoders/)
   i’m sorry but you didn’t answer my question. **WHERE** is this update being worked
   on? You said it’s not on Github, so where is it?
 *  Plugin Support [Marija](https://wordpress.org/support/users/marijastuntcoders/)
 * (@marijastuntcoders)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18651153)
 * Hi [@subscriptiongroup](https://wordpress.org/support/users/subscriptiongroup/),
 * The updates have not been made public – we will be sure to update you once they
   are available and ready.
 * Kind regards,
   Marija
 *  [nlp2016](https://wordpress.org/support/users/nlp2016/)
 * (@nlp2016)
 * [2 months, 1 week ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18806069)
 * Hello,
 * I’m having the same issue using GDPR Cookie Compliance Plugin. There it’s properly
   configured to disable cookies when consent is not enabled. I realized all the
   data was anyway being passed because I had more sales in the Facebook events 
   than in Google Analytics, and the sales in the Facebook events are the same as
   in Wocommerce. So clearly this plug is overriding the configuration from GDPR
   Cookie compliance.
 * We are not using any hardcoded code because the GDPR cookie compliance tool clearly
   says we shouldn’t do that. Based on this thread I see that you are totally aware
   and it’s something that needs to be solved by your plug in and not the cookie
   plug in.
 * Could you please inform the status? we are a very small shop, operating in Germany,
   and we would like to avoid issues.
 * Thanks in advance.
 * Luciana

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcookies-being-set-before-customer-consent%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/facebook-for-woocommerce/assets/icon.svg?rev=3469606)
 * [Meta for WooCommerce](https://wordpress.org/plugins/facebook-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-for-woocommerce/reviews/)

 * 13 replies
 * 3 participants
 * Last reply from: [nlp2016](https://wordpress.org/support/users/nlp2016/)
 * Last activity: [2 months, 1 week ago](https://wordpress.org/support/topic/cookies-being-set-before-customer-consent/#post-18806069)
 * Status: not resolved