What is COGS?
Cost of goods sold: the direct costs attributable to producing what you sold.
Materials, the labour that touched the product and payment processing belong in it. Rent, salaries and marketing do not. Putting them in means you are computing operating margin under a different name.