In the DB4 Menu set the 'Record Setup' source to 'Mix' the set the 'USB Routing' so 'Send 4' is set to 'Mix'
In Traktor set the 'Input Routing' on 'Channel D' to 7/8, in the 'Recording Setup' set the mode to 'External' and the 'External Input' to 'Channel D'.
This will now be set up to record the Mix from the DB4 including the filters/effects/looping etc.