I think the pump should work best ahead of the filter. If it is after the filter, and the filter gets a bit clogged up, the pump may cavitate from the low inlet pressure. But, if the pump produces a low head pressure, it might not have enough oomph to push water through the filter and lift it back up over the top of the tank. So, it depends on the pump parameters.
"Little Giant 3-MDQ-SC (581506) is a Magnetic Drive Aquarium Pump 1/15 HP, 115V, 6' power cord - SC Quarium Series for semi-corrosive salt solutions and chemicals, designed for in-line saltwater and freshwater aquarium circulation and filtration applications.
Little Giant 3-MDQ-SC 'Quarium Series features a leakproof, seal-less magnetic drive and a more quiet operation for freshwater and saltwater aquariums. Little Giant 3-MDQ-SC has 1/2" MNPT discharge and 3/4" FNPT Intake with head capacity of 18'
. This is a pressure applicable pump. The MDQ model was built to handle back pressure very well
and is recommended for high head heights or for canister filtration systems."