This paper presents a generalized formulation, analysis, and optimization of energy harvesters subjected to galloping and base excitations. The harvester consists of a cantilever beam with a bluff body attached at the free end. A nondimensional lumped-parameter model which accounts for the combined loading and different electro-mechanical transduction mechanisms is presented. The aerodynamic loading is modeled using the quasisteady assumption with polynomial approximation. A nonlinear analysis is carried out and an approximate analytical solution is obtained. A dimensional analysis is performed to identify the important parameters that affect the system's response. It is shown that the response curves of the harvester can be generated in terms of only three dimensionless loading parameters. These curves can serve as a complete design guide for scaling and optimizing the performance of galloping-based harvesters. As a special case study, a harvester subjected to only galloping excitations is analyzed. It is shown that, for a given shape of the bluff body and under quasi-steady flow conditions, the harvester's dimensionless response can be described by a single universal curve irrespective to the geometric, mechanical, and electrical design parameters of the harvester. The universal curve is utilized to obtain the optimal harvesting circuit design parameters, that minimize the cut-in wind speed and maximize the output power, and predict the harvester's total conversion efficiency. KEYWORDS: Energy Harvesting, Galloping, Base Excitations.