Closed (fixed)
Project:
Cookie Control
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Mar 2012 at 22:45 UTC
Updated:
26 May 2012 at 12:40 UTC
Investigate the use of supported callbacks.
Cookie Control has four handy callbacks that can be used to execute scripts:
Comments
Comment #1
buddaonAccept callback is supported through the admin UI for any script which needs to be called.
Comment #2
BenWrighton commentedonAccept is good but don't you also need onCookiesAllowed for this to module to work effectively?
Budda as you yourself stated here
Does that mean that if the admin UI only supports onAccept then every subsequrent time the user loads a page GA won't fire?
Ideally wouldn't the admin UI support all the Cookie Control callbacks?
ref - http://civicuk.com/cookie-law/deployment#callbacks
Comment #3
buddaAny Drupal modules laying down cookie contaminated javascript will need to add support for wrapping their javascript in a onCookiesAllowed() call.
My initial thought is to try and support this generically in the module by modifying the javascript array Drupal has. I've not tinkered with it yet. Until then the onCookiesAllowed() callback should be used on a per site basis.
Comment #4
buddaAdded support for hook_cookiesallowed_alter() and hook_cookieaccept_alter() to add on extra javascript functions to call.
An example Google Analytics sub-module is included to turn off analytics until consent has been granted by the visitor.
Comment #5
buddaAdded support for final callback hook_cookiesnotallowed_alter() !
Get that down. Finished.