I already referenced both these posts:
My question is how do I pass first party cookie value into the hidden field?
I already created the first party cookie with the medium value and the source value, I just need to take those values and populate the hidden field.
As a side note I am using google tag manager.