Given your outdated EE version, I'm not sure there are any viable add-on's that can help you with this (maybe Mo' Variables if you can get an old version?).
A quick search shows this add-on:
https://devot-ee.com/add-ons/pg
Might do the trick. And there maybe other plugins if you search for them. If not...
You have two options. The first would be to craft a plugin that can grab, parse, and return query variables you ask it for. Then you could (probably) do something like this:
{exp:cookie_plus:set
name="cookie"
value="{exp:my_query_plugin:get query='gclid'}"
seconds="86400"
parse="inward"}
Not sure all of that would work with EE 2.8, I have no access to an install earlier than EE 4.
The second is to simply skip using templating to get this done. It's easily done in JS:
https://davidwalsh.name/query-string-javascript
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie
You can test if the query param exists, and if so, set a cookie in JS.