When I first downloaded thefile from the link suggested by Google and then installed it onto my site it didn’t really work correctly. It would display the message but when the user clicked on the ok button the Cookiechoices cookie only seemed to be getting set for that specific page, so when a second page was visited the cookie message would be displayed a second time.
Cause of the Error
The reason for this was that the cookiechoices code was not setting the path correctly. You can see the Path that the cookie sets by going to “More tools->Developer tools” within Chrome and then selecting the Application tab and expanding Cookies within the Storage tree structure. As you can see in this example the path /abap has been included as part of the cookie properties. This is not what you want, it should just be a ‘/’ like all the others. In this case the cookie will only be set for all pages within the /abap directory rather than the whole website.
Once you have implemented the above fix and uploaded the new file to you website try a page where the cookie choices message is displayed and click the OK button again. The result should be that the cookie is set for the route of the website.