optimization template and analytics