0
votes

I would like to create a Report in Google Sheets using the Google Analytics API - more precisely, to import the data in Ecommerce Shopping Behavior Analysis.

Specifically, the following data appears unavailable as a metric / dimension:

- No Cart Addition - Sessions with Add to Cart - Cart Abandonment - Sessions with Check-Out - Check-Out Abandonment

I also noticed that Product Add to Carts and Quantity Add to Cart (in metrics) does not present the data as unique - i.e. unique Add to Carts within a session but rather the total Add to Carts for a given dimension.

Brief, how can I access information available in Ecommerce Shopping Behaviour Data in GA via a Google Analytics API / Report in Google Sheets.

1

1 Answers

3
votes

Here is the list of dimensions and metrics available in the core reporting API.

Unfortunately, you cannot fetch cart abandonment data as is, because there are no dimensions and metrics about it and the API doesn't expose the various e-commerce checkout steps (it's something calculated internally by GA, but not exposed via the API).

Your options:

  • Cart Abandonment Segment: you can create a segment (UI, API) which conditions reflect that of an abandoned cart. For instance people who added something to their cart but ended up not buying (ga:productAddsToCart>0 AND ga:transactionRevenue=0) and apply that segment to your API requests so all the data you pull is related to abandonments.

enter image description here

  • Goal Abandonment metric: you can configure an additional funnel goal with each step matching a page of your funnel (if you have a one-page checkout, you will need to setup virtual pageviews you can use in your funnel), and use the ga:goalXXAbandonRate or ga:goalXXAbandons metrics to get the number of abandons.