Home » Google Analytics » Google Analytics Enhanced E-Commerce Funnels in Data Studio

Google Analytics Enhanced E-Commerce Funnels in Data Studio

I’ve been working on creating some Data Studio reports using the Enhanced E-Commerce reports for Google Analytics and was unable to find anything that closely replicated the funnels. I found some great posts from Michelle Kiss and Doug Hall that provided some innovative ways of approaching this, but what I could not find was a solution that only used the native Google Analytics connector or anything that dealt with some of the nuances around open/closed funnels and the additional metrics. I’m excited to share a set of templates for the Shopping Behavior Funnel that I believe solves for this.

Data Studio Shopping Behavior Funnels

Here is an embedded view of the funnel that I created to be as close as possible to the actual Shopping Behavior Funnel Report. Hover over steps 2 or 3 and you will see we even managed to replicate the entrances into the steps (steps 2 and 3).

Here is another template that was made to be interactive. You can click on the widgets for Device Category, Channel, and Country and you see the funnel update with your selections.

Be sure to look through all five pages in the template report, which include examples with Log Scale enabled/disabled and different versions of the funnel for you to play with.

How Was This Created?

To create these funnels it requires some creativity, as there are a number of challenges that have to be solved. The first challenges was how to create a simple funnel.

Simple Funnel

To create a simple Enhanced E-Commerce funnel in Data Studio you need to use the Shopping Stage dimension with Sessions as the metric. You will find there are over 20 shopping stages, so the first step is to create a filter to only include the ones needed. You can then use a bar chart to create the funnel visualization, but you will find that the steps are not in the right order. To solve this, you need to create a CASE statement, which will force the sorting.

Step 1: Create a table widget using Shopping Stage and Sessions
Step 2: Apply the following filter. Name = Include Shopping Behavior Stages Only. Conditions = Include – Shopping Stage – RegExp Contains – ^(ALL_VISITS|ADD_TO_CART|CHECKOUT|PRODUCT_VIEW|TRANSACTION)$
Step 3: Create a New Calculated Field (Click Add Dimension then Add Field) and use the following CASE statement

CASE
WHEN REGEXP_MATCH (Shopping Stage, “ALL_VISITS”) THEN “1) All Sessions”
WHEN REGEXP_MATCH (Shopping Stage, “CHECKOUT”) THEN “4) Sessions with Check-Out”
WHEN REGEXP_MATCH (Shopping Stage, “ADD_TO_CART”) THEN “3) Sessions with Add to Cart”
WHEN REGEXP_MATCH (Shopping Stage, “TRANSACTION”) THEN “5) Sessions with Transactions”
WHEN REGEXP_MATCH (Shopping Stage, “PRODUCT_VIEW”) THEN “2) Sessions with Product Views”
END

Step 4: Change to a Bar Chart and then change sort to Ascending.

Enhanced E-Commerce Funnel

To create the actual Enhanced E-Commerce Funnel there is a lot more that has to happen. I’ll show you some of the key points that were needed and you should be able to use the template report for the rest (just create a copy and starting editing/exploring).

Step 1: We need a different Case Statement to create a new calculated field that allows us to create the open funnel visualization. Use this:

CASE
WHEN REGEXP_MATCH (Shopping Stage, “ALL_VISITS”) THEN “1) All Sessions”
WHEN REGEXP_MATCH (Shopping Stage, “CHECKOUT_WITH_CART_ADDITION”) THEN “4) Sessions with Check-Out”
WHEN REGEXP_MATCH (Shopping Stage, “CHECKOUT_WITHOUT_CART_ADDITION”) THEN “4) Sessions with Check-Out”
WHEN REGEXP_MATCH (Shopping Stage, “ADD_TO_CART_WITHOUT_VIEW”) THEN “3) Sessions with Add to Cart”
WHEN REGEXP_MATCH (Shopping Stage, “ADD_TO_CART_WITH_VIEW”) THEN “3) Sessions with Add to Cart”
WHEN REGEXP_MATCH (Shopping Stage, “TRANSACTION”) THEN “5) Sessions with Transactions”
WHEN REGEXP_MATCH (Shopping Stage, “PRODUCT_VIEW”) THEN “2) Sessions with Product Views”
END

Step 2: Here is an example of the table where we can see the Data Source is a blend of the 5 filtered metrics together. This allows us to create all the calculated fields needed for the completion rates.

Many other steps went into the report above, but again, they are all pretty much just blends of the data source with itself. Explore the templates blended data sources and you can view all the settings/components for the 14 blended data sources that were required.

There is a lot more I want to do with these, but this should serve as a good starting point for building even better versions and variations! Let me know what you think!

Leave a Reply

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