Vincent Lin
Vincent Lin

Reputation: 31

GA4 ecommerce items Array do not show up in debug mode

enter image description hereGA4 ecommerce items Array do not show up in debug mode i am using the GTM, i am sure i passed the Array for items (using Datalayer or CJS), but GA4 does not recognized it , what i see is missing the items tab in debug mode, i don't know how that could be show up , am i doing something wrong? anyone has the same experience?

enter image description here

Upvotes: 2

Views: 4840

Answers (4)

Siwaporn Boonkan
Siwaporn Boonkan

Reputation: 1

Do you use the same GTM data layer which initially track for GA Universal events ? If yes, then this may be the cause why the items array did not show on debug view since I found this issue also.

The solution is to create the new GTM Container, and name the data layer differently like 'datalayer2' to differentiate those data layers and set up your config again with 'datalayer2'

for instance, datalayer2.push( { event : view_promotion ....}

Upvotes: 0

Woden
Woden

Reputation: 1386

Google has a list of recommended events suggesting that the items are automatically collected. If your custom event name doesn't match the listed event, GA4 won't take the items data.

Note that even though you can use the GTM preview mode to check whether the data is correctly constructed, the shown data won't necessarily send to GA4.

The reason is that GTM only forwards the requested data instead of sending it to GA4 directly. To see this behavior, you may have a look at the dev tool such as Chrome dev tool. You can examine the forwarded request's payload in the network tab (search /collect.*/). If it's the recommended event, in payload, there's pr1, pr2, etc., representing your items' array data; otherwise, you'll see nothing, and thus the data won't show up in the GA4 debugging mode.

Upvotes: 0

v2639
v2639

Reputation: 11

Looks like the event name is incorrect here -> View_Items.

Make sure that the event name exactly matches view_item (stylized as snake_case).

As GA4 only allows ecommerce data collection with a set of pre-defined event names.

Upvotes: 1

darrelltw
darrelltw

Reputation: 2372

Update : enter image description here

I saw this checkbox is being checked

As you already set the value currency items in the event parameter. You can uncheck this setting.


I think you can follow Google's document about it

view_item_details

items: [
    {
      item_id: "SKU_12345",
      item_name: "Stan and Friends Tee",
      affiliation: "Google Merchandise Store",
      coupon: "SUMMER_FUN",
      currency: "USD",
      discount: 2.22,
      index: 0,
      item_brand: "Google",
      item_category: "Apparel",
      item_category2: "Adult",
      item_category3: "Shirts",
      item_category4: "Crew",
      item_category5: "Short sleeve",
      item_list_id: "related_products",
      item_list_name: "Related Products",
      item_variant: "green",
      location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
      price: 9.99,
      quantity: 1
    }
  ]

Make items array only contain 1 item

Upvotes: 0

Related Questions