Wix 404 Routing / Catch all

Then you must create a router that will check the sites structure and match if a page exists of the incoming request and if it does not store the incoming url in a data collection or where ever you want it stored. Look at site structure and routers, thats your best solution.