How to visualize a goal flow segment in Google Data Studio?

This post shows how to visualize a goal flow segment in Google Data Studio. I assume that you have basic knowledge of Data studio's calculated fields.

You can see the visualization in action here.

Assume that the page paths for the goal flow are:

/step1.html
/step2.html
/step3.html
/step4.html

Step I: Create custom field Now create a custom field with the below formula (replace the page paths with the actual page paths).

CASE WHEN REGEXP_MATCH(Page,'/step1.html') THEN '1. Cart' WHEN REGEXP_MATCH(Page,'/step2.html') AND REGEXP_MATCH(Previous Page Path,'/step1.html') THEN '2. Billing and Shipping' WHEN REGEXP_MATCH(Page,'/step3.html') AND REGEXP_MATCH(Previous Page Path,'/step2.html') THEN '3. Payment' WHEN REGEXP_MATCH(Page,'/step4.html') AND REGEXP_MATCH(Previous Page Path,'/step3.html') THEN '4. Review' ELSE 'Others' END

Step II: Create Bar graph

Now create a bar graph with this custom field as the dimension. Use pageviews as the metric.

Step III: Filter out 'Others' Filter out 'Others' from the graph by adding a new filter

Step IV: Style the bar graph

Go to 'Style' and make the below changes for the bar graph: Change the bar chart style from 'vertical' to 'horizontal'.
Select 'Show data labels' That's all! You have the goal flow visualization. You can see it in action