You know that BAM is used to gather statistics from your BizTalk application. What you probably don’t know is that:
%u00b7 You can collect BAM data from your non-BizTalk applications such as external .NET components that BizTalk calls into.
%u00b7 Tracking profile editor (TPE) is not the only way to collect data you can use a set of APIs available in the Microsoft.BizTalk.Bam.EventObservation namespace to read and write directly into the BAMPrimaryImport database.
Check out some of the links here: