UTM code to capture cookie.

Level 6

UTM code to capture cookie.

Hi Everyone\ ​,

I was implementing the UTM google tracks the referral source of the user. I found one code on community regarding this by but ​ was describing few lacks in that code. Can any one you help me with the best code to do that or if there is any correction to be done there.

Not applicable

Re: UTM code to capture cookie.

Are you trying to parse the UTM cookies? Unfortunately Google Analytics Universal no longer stores the referral or campaign info in a cookie, it is saved inside of GA itself.

You should however be able to grab referral information from the HTTP stream - http://stackoverflow.com/questions/3420031/how-do-i-get-the-referrers-domain-host-name-using-javascr... might give you some ideas.