With this sample application I illustrate a way to implement a cookies bar displaying a message to the user. It installs a fake Google Analytics code after clicking the button or scrolling through the document, supporting implicit or explicit permission.
Just run the Rails application like any other and browse it in localhost using the default port.