There are UN guidelines on the compilation of trade statistics, and internationally they are followed pretty much universally. Trade data sources are generally administrative data. The one exception might be within the European Union. For the intra-European Union trade data, because they've gotten rid of the borders, they're now relying on their value-added tax. From what I understand, though, that data is not of better quality.
On March 1st, 2007. See this statement in context.