Through conversions with cart data, you can learn which of your products are selling as a result of your campaigns. This can help you understand which products perform well and which ones need more support.
Cart data provides granular details of conversion events at the SKU level. By sending the Merchant ID, feed label, feed language, and product data, conversions with cart data allows you to track the sales of individual items attributed to specific retailers and campaigns.
Before you begin
- You must ensure that your Floodlight tags are properly configured to collect and pass cart-level data. Learn more about creating Floodlight activities and tags.
 - You must have a conversion event in Display & Video 360 and have selected the appropriate tag to transmit the cart data. Learn more about Floodlight parameters for sales tags.
 - You must maintain the Google tags on your site. You can add and update your tags in Google Tag Manager. Learn more about updating tags in Google Tag Manager.
 - Access to Google Merchant Center Item IDs is required in order to assign the unique identifier of each product sold.
 - To upload offline conversions with cart data, follow this guide about uploading conversions.
 - For mobile campaigns, you can track app conversions using Floodlight and server to server (S2S) call and third-party tools.
 - You must make sure you can modify your website code.
 
Instructions for Google tags
Step 1: Create a transaction tag and event snippet
You can also create the Floodlight tag with Campaign Manager 360 or the old Search Ads 360. If you already have a tag recording transactions, you can skip this step.
- Sign in to the new Search Ads 360.
 - Navigate to a Search Ads 360 account.
 - In the navigation menu, click the tools icon.
 - Under “Measurement”, click Conversions.
 - Click the conversion action that you want to use, or create a new conversion action.
 - Under the “Tag setup” section, click Install the tag yourself.
 - Download the Google tag snippet and event snippet.
 - Add the google tag to every page of your site in the <head> tag.
 - Add the event snippet to the page where the conversion will take place in the <body> tag.
 
Step 2: Update the tag with cart data parameters
- To your event snippet, add parameters in the format of a JSON items array.
    
Each item in the array contains the following parameters:
id: ID of the item sold (must match the ID in your linked Merchant Center feed)price: price of the item soldquantity: quantity of the item soldcountry(optional)language(optional)
 - Specify the parameters for the JSON items array using the cart data parameters table.
 
Example event snippet
id, price, quantity, country, and language based on the needs of your own business: 
    <!--
Event snippet for Thank You on http://example.com/thanks: Please do not remove.
Place this snippet on pages with events you’re tracking.;
Creation date: 11/01/2017
-->
<script>
  gtag('event', 'purchase',
    {
      'allow_custom_scripts': true,
      'send_to': 'DC-1234567/group1/thank123+transactions',
      'transaction_id': '012345',
      'value': 129.97,
      'items': [
       {  'id': '123456755559',
           'price': 19.99,
           'quantity': 1 
        },
        {  'id': '123456788889',
           'price': 54.00,
           'quantity': 2 
        }
      ],
    'country': 'us',
    'language': 'en'
    'merchant_feed_label': 'MAIN',
    'merchant_feed_language': 'en',
    'merchant_id': 987
    }
);
</script>
<noscript>
<img src="https://ad.doubleclick.net/ddm/activity/src=1234567;type=group1;cat=thank123;
qty=1;cost=129.97;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;npa=;
ord=012345;prd=i1:123456755559|p1:19.99|q1:1|i2:123456788889|p2:54.0|q2:2|c:us|l:en?" width="1" height="1" alt="">
</noscript>
<!-- End of event snippet: Please do not remove -->
Note: Event snippets generated by the new Search Ads 360 include an optional <noscript> tag that contains a Floodlight image tag. This tag is used to report conversions in browsers that don't support JavaScript. If your site supports browsers that haven't enabled JavaScript, it's recommended that you update the Floodlight image tag to include cart data parameters as shown in the example.
Example event snippet with country and language codes
You can use Merchant Center to submit your products in multiple feeds, each targeted to a specific language and country. For example, if you sell the same products in the US and Canada, you might set up three feeds with the following target countries and languages:
- US prices and English descriptions
 - Canadian prices and French descriptions
 - Canadian prices and English descriptions
 
When you submit feeds with the same product IDs but different target languages or countries, you'll need to include the language and country code in your cart data parameter.
The following is an example of an items array for a feed targeted to French Canadians:
'items': [
     {  'id': '123456788889',
        'price': 19.99,
        'quantity': 1
     },
     {  'id': '123456755559',
        'price': 54.00,
        'quantity': 2
     }
    ],
'country': 'ca',
'language': 'fr'
'merchant_feed_label': 'MAIN',
'merchant_feed_language': 'fr',
'merchant_ID': 987
Instructions for Google Tag Manager
Google Tag Manager helps you maintain tags on your site. Instead of adding and updating tags directly on your site, you add and update them in Google Tag Manager. Google Tag Manager then outputs properly formatted tags on your site as needed. Learn more about Google Tag Manager.
Step 1: Create a transaction tag and JSON array
- Create a Floodlight tag in the New SA360 or Campaign Manager 360. Learn about Google Tag Manager's Floodlight sales tags.
 - Add the tag to your Google Tag Manager container. Learn about how to Set up and install Google Tag Manager.
 - If you are using Google Tag Manager's data layer to pass data, create a JSON 
ecommerce.purchase.productsarray. 
Example ecommerce.purchase.products array
| 
             
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  | 
          
Step 2: Update the tag with Google Tag Manager
When you need to pass dynamically generated data to tags managed by Google Tag Manager, you can do either of the following:
Use data from the data layer
If your web developer has made the purchase-details variable available in the data layer, follow these steps to pass the data to your Floodlight tag:
- Use the dataLayer.push method to make the data available in Google Tag Manager's data layer.
 - In Google Tag Manager, navigate to the container for your site.
 - Click the Tags tab and click the Floodlight transaction tag that reports sales.
 - Click the Pencil icon to make changes to the tag.
 - Under Product Reporting, check the Provide product-level sales data check box.
 - From the "Data Source" list, select Data Layer.
Google Tag Manager will automatically use the data pushed to the data layer in theecommerce.purchase.productsarray. - Click Save.
 - Preview and publish your changes.
 
Use a variable to access other data
If your cart data parameters are not available in the data layer, you can use a Google tag manager variable to pass the data on.
- In Google Tag Manager, navigate to the container for your site.
 - Click the Tags tab and click the Floodlight transaction tag that reports sales.
 - Click the Pencil icon to make changes to the tag.
 - Under Product Reporting, check the Provide product-level sales data check box.
 - From the "Data Source list", select one of the following:
    
- JavaScript variable if the data is formatted as a JavaScript variable.
 - Floodlight formatted value if the data is formatted as a String.
 
 - Click the Add variable icon next to the Product Data Field.
 - Click the New variable button in the upper right.
 - Click the Pencil icon in the variable configuration card and do the following:
    
- Choose the appropriate variable type. For example, if the data is available in a JavaScript variable, select JavaScript Variable.
 - In the next field, enter the name of the object that contains the data.
For example, here's a page that outputs the String as a global JavaScript variable.
<script> window.salesData="i1:sku-12345|p1:100.0|q1:1|i2:sku-67890|p2:20.0|q2:2" </script> 
 - Name the variable either by editing the namespace at the top, or by clicking save and editing the name in the following window. After doing this, you should see the name enclosed in double brackets in the Product Data Field.
 - Click Save again to update the draft version of your tag.
 - Preview and publish your changes.
 
Cart data fields
See the following table describes the type, example values, and descriptions required for cart data parameters:
| Parameter | Type | Example value | Description | 
|---|---|---|---|
ID | 
      String | "98765" | The ID of the product that has been sold. The ID must match the item id from Google Merchant Center. | 
PRICE | 
      Float | 1.50 | Sales price of a single item, excluding tax, shipping, and any transaction level discounts. | 
QUANTITY | 
      Integer | 2 | Number of units sold of the items. | 
| 
       
  | 
      String | "840" | The country associated with the feed where your items are uploaded. Use ISO 3166 country codes.
       This field is needed only when item IDs are not unique across multiple Merchant Center feeds.  | 
    
| 
       
  | 
      String | "EN" | 
       The language associated with the feed where your items are uploaded. Use ISO 639-1 language codes. This field is needed only when item IDs are not unique across multiple Merchant Center feeds.  | 
    
Cart data metrics and dimension
- Item ID sold: This dimension shows the unique identifier of each product sold.
 - Cart revenue: This metric reflects the total revenue generated from the sale of products in the cart. Revenue is calculated as the product of the number of items sold and the price of items in a cart.
 - Units sold: This metric indicates the quantity of each product sold.
 
Limitations
- Cart data reporting is not available on YouTube brand campaigns by default.
 - “Cart revenue” might not always reflect the original currency due to ongoing currency conversion limitations.
 - When you add cart data dimension “Item ID sold”, you won’t be able to include the dimension “Total conversions” because these are incompatible. For example, if you have one conversion across lines, a mechanism to split that conversion across multiple pieces of cart data will be needed.
 - The “Item ID sold” dimension is an overcounting dimension so it’s incompatible with all metrics aside from "Units sold" and "Cart revenue".
 - The "Cart revenue" metric is an overcounting metric so it’s incompatible with all metrics aside from "Units sold" and "Item ID sold".
 - The "Units sold" dimension is compatible with any other dimensions or metrics that are compatible with "Total Conversions".
 - The “Cart revenue” cart data metric and the “Total Revenue” Floodlight conversion metric are 2 different metrics that address different use cases, so these are compatible.
 
Access cart data in reporting
In Display & Video 360
- Navigate to your advertiser.
 - Click Instant & offline within the Reports menu.
 - Create a new instant report or choose a standard report.
 - Select the floodlight configuration containing your cart data.
 - Add these relevant cart data dimensions and metrics:
    
- Cart revenue
 - Item ID sold
 - Units sold
 
 
In Campaign Manager 360
- Navigate to Report Builder.
 - In the “Instant Reporting” tab, click the New button.
 - Select the floodlight configuration containing your cart data.
 - Add these relevant cart data dimensions and metrics:
    
- Cart revenue
 - Item ID sold
 - Units sold
 
 
Once you include the desired dimensions and metrics, you can generate the report and start examining the cart data to understand product performance and sales trends.
Validate your cart data
You can check the cart data being sent through your floodlight conversions in your Campaign Manager 360 account.
- In your Campaign Manager 360 account, click the Report Builder link at the top of the page.
 - From the “Report Builder” screen, click New.
 - A new Instant Report will appear. Add a name for the Instant Report.
 - Filter the report to a single floodlight configuration.
 - Include conversion fields such as “activity ID” and “u-variables”.
 - Add a field to get the transmitted cart data. This allows you to confirm the accuracy and completeness of the cart information your floodlight tags capture.