GA4 Items Array – eCommerce Tracking

in GA4 Items Array is an important part of eCommerce tracking.  I have covered items array in GA4 eCommerce Tracking post along with other aspects of eCommerce Tracking. In this post, I am going to focus on the Items Array completely.

What is GA4 Items Array?

Items array is a JavaScript array object that contains the information about the product(s) that the user on your site or app is interacting with.

An example array with just one item looks like

 

GA4 Items Array Parameters

Items array can contain the following parameter (source: https://developers.google.com/analytics/devguides/collection/ga4/reference/events#view_item_list_item).

 

Of these only item_id and item_name are required, however more information you pass the better your reporting and analysis will be,

Note: You can not pass any additional parameters than those specified above.  This might change in the future but as of the now, that's not possible.

Now that you understand the items array let's look at the event parameters for other events

How to pass Items Array to eCommerce Events

You can pass the items array to any of the eCommerce events as the value for the "items" parameter.

GA4 eCommerce Implementation with gtag

If you are implementing the call directly on your website then you can use the following as an example. Note, in this case, we have two items in the items array.

 

GA4 eCommerce Tracking with GTM (Google Tag Manager)

Below is an example of the purchase event, we are passing a parameter called "items" and the value is a javascript variable that pulls the items array from their custom datalayer.

If you do need any help then reach out to us at support@optizent.com or fill out the form to contact us.

 

Need Google Analytics 4 help and support

We are here to help you with all your Google Analytics needs. Our team can get you up and running in no time and also train you and your team to save you a lot of time so that you can focus on driving the business outcomes rather than configuring Google Analytics 4.

Online Course - If you want to learn on your own then check out Google Analytics 4 Masterclass

Workshop - We conduct the onsite customized workshop. Reach out to us for more details.

Consulting - Reach out to us for more details.

 

Leave a Reply

Your email address will not be published. Required fields are marked *