Adds chartbeat tracking code