I am having troubles with the Cookiecuttr Plugin (Accept or Decline Cookies in your computer)
Seems like if the user does not accept the cookies (or decline them) and just click around in to a link or something like that, the script does not recognizes as he's accepting them (by law its allowed).
Here's the function
JAVASCRIPT
$(document).ready(function () {
// activate cookie cutter
$.cookieCuttr();
});
if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xxx']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document. getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
}
DEMO
Any clue? Because I supose the solution should be creating a variable wich makes the same function (by default clicking in a link outside the div) as "accepting the cookies" button.
Maybe something like that? (Already working on it)
$('href').click(function(){
$.cookieAccepted();
});
Thanks!