// Retrieve Impact clickid from cookie. function getCookie (key) { var keyValue = document .cookie.match( '(^|;) ?' + key + '=([^;]*)(;|$)' ); return keyValue ? keyValue[2] : '' ; }