There are several ways to change the cookie lifespan on a cookie for Google analytics cookie. The default lifespan for the Google Analytics cookie is currently two years.
The method you need depends on how your Google analytics is set up.
If you use the old google analytics script:
If you have an old Google Analytics script on your website, you can specify the expiration date directly in the script and overwrite of the default value of two years. The value sets the cookie expiration, in seconds.
All you need to do is add the cookieExpires parameter to the line in the script that creates the cookie by adding {'cookieExpires': 31536000}, like this:
In some cases you might need to make sure cookie updates are turned off by setting the parameter cookieUpdate to false. This can be done by adding 'cookieUpdate': 'false' to the parameter setting so it looks like this: