webgrafia / ginger

Wordpress plugin to make website compliant with EU Cookie Policy, with opt-in feature
18 stars 7 forks source link

Facebook tracking pixel is not enabled #24

Open Filoz opened 6 years ago

Filoz commented 6 years ago

Hi, your plugin is great; I have two questions

1) Is it possible to revoke consent? Maybe with a link in the footer to show the banner again.

2) after consent is given by visitor, the facebook pixel isn't enabled.

the code still has class="ginger-script" type="text/plain">

Thank you

Filoz commented 6 years ago

The new version didn't solve the issue

this is the code after the cookie bar is accepted:

<!-- WooCommerce Facebook Integration Begin --><script type="text/plain" class="ginger-script">
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
</script>

ginger didn't restore the javascript code

Filoz commented 6 years ago

I found the solution: although I have w3tc, I had to set "no" to cache option; otherwise it doesn't work