UK cookie acceptance
Hi guys
Am trying to get a cookie accept/decline bar to work. I have it working fine but struggling to get the google analytics code to be hidden should the visitor decline cookie usage.
Basically, all I am trying to do is create an if statement to wrap around the analytics code but am not sure how to structure the if statement to 'capture' if the decline button has been selected.
Have attached the js file and the if statement that I have got (and isnt working) is this:
<?php if(jQuery.cookieBar('cookies')){ ?>
analytics code to go here
<?php } ?>
with that, I am getting the following error:
Fatal error: Call to undefined function cookieBar() in /home/motlemso/public_html/includes/fixed/analytics.htm on line 2
any pointers in the right direction would be most grateful
Cheers
Jamie