Wikipedia
An electrogastrogram (EGG) is a graphic produced by an electrogastrograph, which records the electrical signals that travel through the stomach muscles and control the muscles' contractions. An electrogastroenterogram (or gastroenterogram) is a similar procedure, which writes down electric signals not only from the stomach, but also from intestines.
These names are made of different parts: electro, because it is related to electrical activity, gastro, Greek for stomach, entero, Greek for intestines, gram, a Greek root meaning "to write".
An electrogastrogram and a gastroenterogram are similar in principle to an electrocardiogram (ECG) in that sensors on the skin detect electrical signals indicative of muscular activity within. Where the electrocardiogram detects muscular activity in various regions of the heart, the electrogastrogram detects the wave-like contractions of the stomach ( peristalsis).
Walter C. Alvarez pioneered early studies of electrogastrography in 1921-22.