One can take steps to prevent palpitations by; reducing anxiety and stress in life, avoiding or limiting stimulants, such as caffeine, nicotine, alcohol. Avoiding illegal drug use and seeking treatment for medical conditions that may lead to palpitations(such as an overactive thyroid) or arrhythmias(irregular heartbeats).
Attribution: Straight Talk Foundation