Making analytics link work if there is only from date or to date