Cardiotocography (CTG) involves continuous electronic monitoring of the fetal heart rate and uterine contractions. It is done externally via ultrasound transducers on the mother's abdomen or internally via an electrode attached to the fetal scalp. CTG is used to evaluate the fetal heart rate patterns including baseline rate, variability, accelerations, and decelerations which can indicate fetal well-being or distress. Abnormal patterns may necessitate changes to labor management or delivery.