Where the electrocardiogram detects muscular activity in various regions of the heart, the electrogastrogram detects the wave-like contractions of the stomach (peristalsis).
The first human electrocardiogram was recorded in 1887, however it was not until 1901 that a quantifiable result was obtained from the string galvanometer.