rhoffen
rhoffen

Reputation: 21

Ecommerce data in GTM GA4 Event tag not showing up in GA4 Ecommerce Purchases report

I am using GTM on our Product Cart website to fire a GA4 event tag called Product Cart Purchase, with the event name purchase_from_cart. When users complete a purchase, they are redirected to a page on the site with /designer-download in the URL path, and the query string contains all the info I need for the ecommerce analysis. Instead of using the data layer, I have defined custom variables using the URL query string and composed a custom Javascript variable called ecommerce_object .

In the Ecommerce configuration of this tag, I have Send Ecommerce Data checked, with the Data source as Custom Object, Ecommerce Object is the value of the {{ecommerce_object}}, and the ecommerce_object value is generated like this:

  function() {
    return {
      transaction_id: {{transaction_id}},
      value: {{signup_revenue}},
      currency: "USD",
      items: [
        {
        item_id: {{product_id}},
        item_name: {{item_name}},
        currency: "USD",
        price: {{signup_revenue}}
        }
      ]
   };
  }

The values {{transaction_id}}, {{signup_revenue}}, {{product_id}} are derived from the query parameters, and {{item_name}} is derived from another Javascript custom variable translating the {{product_id}} to a string naming the product. But when I look at the Monetization: Ecommerce Purchase report in Google Analytics, it has no data.

Here's what I've tried:

What am I missing?

Upvotes: 0

Views: 201

Answers (1)

JFA
JFA

Reputation: 1

Events you give custom names to won't populate the pre-generated reports. To work with the reports built in to GA4, you need to use the event names recommended in the documentation.

If you call the event_name purchase instead of purchase_from_cart that should get into the monetization report.

Upvotes: 0

Related Questions