cost_of_goods_sold [cost_of_goods_sold] (cogs): Definition

Use the cost_of_goods_sold [cost_of_goods_sold] attribute when reporting conversions with basket data to get additional reporting on gross profit. Note: You must report item-level information for each of your conversions in order to use this type of reporting. 

When to use

Optional for all products
Use this attribute when reporting purchased item information using the global site tag. This data is used to calculate an estimated gross profit of your products. Gross profit is the difference between your revenue and the cost of goods sold (COGS). The information that you share with Google regarding COGS is for reporting purposes and does not need to be exact. You need only to provide a rough estimate of your actual COGS in order to get an indication of how much profit you have made through conversions. If your COGS varies for a given product, we recommend that you provide an average.


Follow these formatting guidelines to make sure that we understand the data that you're submitting. 

Type Number plus currency (use ISO 4217)
Repeated field No


File Format Example Entry
Text/Tab-delimited 10.01 GBP
XML (Feeds) <g:cost_of_goods_sold>10.01 GBP

To format your data for Content API, have a look at the Content API for Shopping.



Follow these guidelines to make sure that you submit high-quality data for your products.

Minimum requirements

These are the requirements that the value you provide will need to meet. If you don't follow these requirements, your items may not be eligible for reporting, which could result in incomplete reporting data.

  • Use the currency with ISO 4217 codes e.g. "USD".
  • Use '.' rather than ',' to indicate a decimal point.

Best practices

Go beyond the basic requirements and optimise your product data for performance with best practices.  

  • Use the same currency for COGS that you use for the price reported in conversion. This way you will avoid accidental inconsistencies due to currency conversion rates. 


Mobile phones or tablets 

Product Google Pixel 5-inch 32GB Quite Black
title [title] Google Pixel 5-inch 32GB Quite Black
price [price] 300.00 GBP
cost_of_goods_sold [cost_of_goods_sold] 290.00 GBP
google_product_category [google_product_category] Electronics > Communications > Telephony > Mobile phones
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue