Intercept the submit form event on Create/Update campaign pages.
Then populate the hidden category input field with a JSON representation of the manager's category selections.
Each selection has "name" and "depth" property added to it's entry in the categoery data JSON array.
This data can then be parsed on the server side in: T224238: Update server-side functions to use JSON category data