Thanks Feherke,
Your right, there is no issue with your code, the issue is with the google analytics code.
_gat is not defined
var pageTracker = _gat._getTracker("**-******-1");
i'm having a look on google if there are any other people experiencing this problem.
Once again, thank you.
Thank You so much Feherke.
This is brilliant.
Just one thing, i don't think the cookies disable function is working as it should, when I click on the link to disable cookies, it doesn't remove the cookies when I go to look at them on firefox.
Or alternatively could it be set so that when the...
The page is not on a live site yet, it is only on the development box at work, however i will put the code on the page here for you. currently the page only has a button on it which when clicked creates the cookie. this same button has 2 functions to it's onClick method, first it creates the...
Thanks,
I've got it showing on firebug...
I've amended that if statement to instead of assignment with the one =, i've changed it to == which is equality check. This has sorted the error in firebug, however it still only sets the one cookie, not my analytics cookies...any suggestions, thanks...
Thanks Feherke
I use firebug in firefox sometimes, does this have the error in it?... As im not familiar at all with javascript, im not reallys sure where i need to be looking either to rectify the error..
Just struggling with the cookieExists function I have which checks if a cookie exists then allows the analytics cookies to be set, would someone please have a look and let me know what i am going wrong?...my cookie nama is websitecookie
<script type="text/javascript">
function...
I think it can also be set in the onClick in the button to determine the order of the functions to execute.
Is the code i have put ok for checking if the cookie exists and if it does then allow the analytics cookies?
Thanks guys,
What the ICO have done is similar to what I am trying as well. I can get the cookie created, that fine.
However what I want help on if possible is in my function cookieExists, in this function I want to check that the cookie named "websitecookie" exists and if it does, then I...
Thanks Vacunita,
I've sorted the cookie set function.
Once the cookie has been created, how can i get it to automatically call my function to check if the cookie has been set and if it has, in the process allow the google analytics cookies to be set?
The code i have for this is:
function...
Thanks for your help vacunita,
name = websitecookie;
value = cookiecreated;
I thought i defined the variable in the:
function Set_Cookie( name, value, expires, path, domain, secure )
Can you please advise how to sort this please?
changed it to below but still not getting the cookie set:
function Set_Cookie( name, value, expires, path, domain, secure )
{
name = websitecookie;
value = cookiecreated;
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );
if ( expires )
{
expires =...
Thanks Prattaratt,
The website i work with has thousands of pages so the option of another website which is cookie free would not be an option for us, however yes that still leaves the question of what to do with the people who say no to cookies...
As for the law, I don't think it relates to...
Can i just run my code past you please, to check if I'm on the right track as javascript is not really my strong point.
<input type="checkbox" onclick="Set_Cookie()">
Header code to create the cookie:
<script type="text/javascript">
Set_Cookie( 'websitecookie', 'cookiecreated', 730, '/', ''...
Thanks vacunita, I will work with your solution.
Good question NESWalt, from all the current guidelines out there it seems if the user decides not to have cookies, they will end up getting a website that does not function well at all, the lawmakers do not seem to be too concerned about that.
Ideally we wouldn't want the visitor to disagree.
But if they disagree, then I don't want any cookies to be created. The cookie value if accepted will be accepted and if not it will be declined, if that is possible.
Thanks NESWalt,
This is not allowed for European sites under the new laws which will be coming into force.
New laws make it compulsary for you to get the users consent, and until you don't get their consent you cannot place any cookies on this machine.
This is the reason why I want to have...
Hello,
I am wanting to have a prompt on my webpage load that asks the user if they allow the use of cookies, this is in line with new european directives that are due to come into force.
Once I get the user permission that is when I want the cookie to be set. I have the code to create the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.