fixed bug with analytics ; added env var to config db