cancel
Showing results for 
Search instead for 
Did you mean: 

Google Ads Conversion Events With Cart Data

Google Ads Conversion Events With Cart Data

Hello,

 

I am having trouble getting the Cart Data to come over to Google Ads. We have implemented the main Google Tag along with the event snippets. but all we are still getting is the conversion and total value. Please assist, below is a sample of the tag.

<!-- Event snippet  - Product Purchased - Conversion Event conversion page -->
<script>
  gtag('event', 'conversion', {
      'send_to': ‘XX’XXXXXXXXXX,
      'value': 0.01,
      'currency': 'USD',
      'transaction_id': ''
  });
</script>

 

1 REPLY 1

Re: Google Ads Conversion Events With Cart Data


@Kylerlockeb306 wrote: BallSportsGear

Hello,

 

I am having trouble getting the Cart Data to come over to Google Ads. We have implemented the main Google Tag along with the event snippets. but all we are still getting is the conversion and total value. Please assist, below is a sample of the tag.

<!-- Event snippet  - Product Purchased - Conversion Event conversion page -->
<script>
  gtag('event', 'conversion', {
      'send_to': ‘XX’XXXXXXXXXX,
      'value': 0.01,
      'currency': 'USD',
      'transaction_id': ''
  });
</script>

 



I’m sorry to hear that you are having trouble getting the Cart Data to come over to Google Ads.

It sounds like you are using the basic event snippet for conversion tracking, which only sends the value and currency parameters to Google Ads.

To get the Cart Data, such as product IDs, names, prices, and quantities, you need to use the enhanced event snippet, which also sends the items parameter to Google Ads. 

The items parameter is an array of objects that contain the product information for each item in the cart.

 

To use the enhanced event snippet, you need to modify your code as follows:

<!-- Event snippet - Product Purchased - Conversion Event conversion page --> <script> gtag(‘event’, ‘conversion’, { ‘send_to’: ‘XX’XXXXXXXXXX, ‘value’: 0.01, ‘currency’: ‘USD’, ‘transaction_id’: ‘’, ‘items’: [ { ‘id’: ‘P12345’, ‘name’: ‘T-shirt’, ‘price’: 9.99, ‘quantity’: 1 }, { ‘id’: ‘P67890’, ‘name’: ‘Jeans’, ‘price’: 29.99, ‘quantity’: 2 } ] }); </script>

You need to replace the sample values with the actual values from your cart data. You can use PHP variables or JavaScript functions to dynamically populate the items parameter.

I hope this helps you get the Cart Data to Google Ads.