How to set httponly flag for google analytics cookie in web

Viewed 555

How to set httponly flag for GA cookies _ga & _gid? Tried setting session.cookie_httponly as true in php.ini but not able to achieve httponly as true in cookie.

browser info

php info

1 Answers

This cannot be done. Google Analytics is run using javascript. So, HTTP only flag won't work, as the cookie needs to be set and read by javascript.

Related