added some analytics to the new exchange code