Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Do Google Analytics cookies use Javascript?

Featured Replies

If a user has Javascript disabled, am I right in thinking that Google Analytics can't set any cookies in their browser? I'm thinking in terms of complying with the Cookie Law - the message about cookies could be set to display via Javascript, right? So users who have it disabled will never see it, but also don't need to. Is this right?

Google Analytics relies on JavaScript, yes. But just display the message anyway, no need to have javascript infuence whether or not it is displayed.

Just so you know... that 'cookie law' has been binned.

 

http://www.alphr.com/realworld/381976/the-icos-shame-faced-u-turn-on-cookies

 

Interesting, has this been published on any reputable news sites like BBC? I imagine we'll be seeing a lot of articles on it if the article is correct. I hope it is because the cookie law is nonsense, and besides cookies are kinda going out of date now we have APIs like localstorage.

  • Author

Google Analytics relies on JavaScript, yes. But just display the message anyway, no need to have javascript infuence whether or not it is displayed.

 

Ah, the thing is - if the user has Javascript disabled, they won't be able to close the message :/

 

 

Just so you know... that 'cookie law' has been binned.

 

http://www.alphr.com/realworld/381976/the-icos-shame-faced-u-turn-on-cookies

 

Aww, I got all excited... I don't think that's what the article is saying, though. Just that it's stupid and doesn't work. Which I agree with. Really, as if people needed to be even more afraid of cookies than they already were!

 

Ah, the thing is - if the user has Javascript disabled, they won't be able to close the message :/

 

Doesn't matter, put it somewhere that it doesn't make the content unreadable. Those users already have a terrible experience because many sites use JS and almost all web-apps require it. As long as the content is still accessible then do not worry about appearance for these people, you're wasting your time on that 0.05%. Focus that time on making a better experience for the 99.5%.

 

BUT if you really had to make the box clickable you can use the css checkbox hack. https://css-tricks.com/the-checkbox-hack/ No JS needed, although I use this for styled form elements I find most that tend to use this kind of hackery under normal situations do so because they don't know JavaScript and wish to avoid it at all costs.

Edited by rbrtsmith

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.