set env vars with link stats