Created
March 12, 2020 12:23
-
-
Save simonporter007/8b8374502430d330f00c28e398f42019 to your computer and use it in GitHub Desktop.
Facebook for WooCommerce: Only load tracking scripts if Cookie Notice is active and customer has accepted the cookie
Hey @lioncatde!
The meat of the code is where it calls the check_cn_has_been_accepted function. This needs to be a custom function that runs a check to see if the customer has consented to the cookie. If so, then it should return true, otherwise false, to prevent Facebook pixel from loading.
I'd suggest reaching out to your cookie plugin developer and ask if there's a way for you to tell if a customer has accepted a cookie notice!
Cheers,
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much!
How can I configure this script to work with any other cookie notice / cookie consent plugin?