Learn business growth with Google Analytics 4 Forums Google Analytics 4 Implementing GA4 ecommerce events for product variants in Google Analytics

  • Implementing GA4 ecommerce events for product variants in Google Analytics

    Posted by Taylor on 13 June 2023 at 2:05 am

    Hey there, I’m currently making the jump to GA4 and nailing down all the ecommerce events. I’ve stumbled onto something and I can’t seem to find an answer.

    You use view_item whenever a customer looks at a product, right? And this event expects currency, value, and items. You put in the NETT price in the value and in items, you fill in all your products.

    Now here’s where I’m a little stumped. Like many of us, I’ve got a bunch of products with variants. Imagine a glove that comes in small, medium, and large. What’s the right way to send this?

    Option 1: Trying to fit all the variants in the items array. Downside? This will likely mess with the value field since different sizes are priced differently.

    Option 2: Generating a separate view_item event for each variant. It sorta makes sense, but I can’t find anything in the documentation that says that’s a go.

    Option 3: Playing around with a view_item_list event. Seems reasonable, as it doesn’t need a value field. But I’m not showing a list or category though, just a single product with its various dimensions. The docs don’t make it clear if view_item and view_item_list are dealt with in the same way though.

    What do you think? I’m open to suggestions.

    Emma replied 1 year ago 3 Members · 2 Replies
  • 2 Replies
  • Brett

    Member
    17 June 2023 at 12:01 pm

    Funny, I had the same question too! After some consideration, I personally decided to go with Option 2. To me, ‘view_item_list’ seems to suggest a product listing page or a section of recommended products. The only downside I see is it might overstate the views for the main product. But then again, it’s all a matter of how you interpret the data, isn’t it?

  • Emma

    Member
    22 June 2023 at 12:58 pm

    It seems like you’re overthinking a bit. Usually, with GA4, you’d track the product view, not each variant. So, you’d send the product and its ID for the ‘view_item’ event. Then, when a customer checks out, you can use the ‘item_variant’ property to track which variant was involved. This way, if a customer adds an item to their cart, you use the ‘product ID + variant name’ to track it. GA4 can’t currently report on this granular level, but with their new custom item dimensions feature, you might be able to create a tailored solution.

Log in to reply.