Are they a cost only by virtue of the sale i.e. directly attributable to the sales. If so, they are a cost of sales. Expenses are fixed and variable costs of the business that are not directly related to the sale eg rent, rates, etc. But a portion of some of the expenses may also be cost of sales eg office Electricity = expenses while sale related electricity = cost of sales. Its a judgement call. The main thing is that your gross margin makes sense to Revenue inspection and that you don't over complicate it.
I think you also need to consider capitalising (either a fixed asset or current asset) some of the cost which can lead to future sales. This would enable you to match the sale and related expense rather than expensing it all now.
Hope that makes sense and that you can implement it to your business.