GSC Query Segmentation Visualization on Data Studio with Regex

Regex (regular expression) is an incredible tool in an SEO’s arsenal that allows us to accomplish great things and save a ton of time that would otherwise be spent manually organizing the data.

Ever since the Google search console has gotten regex update the tool has become more powerful than what it was.

In today’s post we will learn how we can do Google Search Console query segmentation visualization in the Google Data Studio Dashboard.

To master this, we need to learn about regex function on Google Data Studio and it differs here from how it works on other platforms like Google Sheets or Google Search Console.

Here is an ultimate Google Data Studio Regex resource by Google that you should refer to.

1. Identifying Brand Vs Non-Branded Queries at once

google data studio branded vs non branded queries

Since my blog doesn’t have enough branded queries so just to state an example I am taking “hostinger” as a branded keyword and visualizing the branded vs non-branded query segmentation on a table.

to do this all I needed was a basic regex formula.

WHEN REGEXP_CONTAINS(Query,'hostinger') THEN "Branded"
ELSE "Non-Branded"

P.S. I know that branded keyword isn’t just one exact match keyword on a website. For your use case, you can use special characters like whitespace in the regex formula or build conditional formula with characters like (^,|,.*) to have them reflect the exact queries that are branded for your data visualization purpose.

You can also visualize this data in a two-line graph instead of a table.

branded vs non branded traffic 2 line graph

The dimensions you will need for this visualization are “Date” as the primary dimension.

Query Type Regex dimension we built a “Breakdown dimension” and lastly clicks as metric, sort & secondary sort.

2. Detecting FAQ Queries

identifying question queries google data studio

Here is how to visualize the split between question queries and non-question queries on Data Studio or as I have flagged them as FAQ Queries.

For this particular use case I have used the following regex.

WHEN REGEXP_CONTAINS(Query,'^[what|why|how]') THEN "FAQ Query"
ELSE "General Query"

Just like GSC, I have bucketed all types of question keywords and added (^) at the beginning of it as that means to tag keywords that begin with.

And just like that I immediately get the split.

3. Finding Queries from Specific Countries

This regex is at your rescue when you want to find queries from specific countries.

And the regex is

					REGEXP_CONTAINS(Country,'[United States,Australia]')

4. Segmenting Queries based on Intent

google data studio intent based query segmentation

Want to build a beautiful line chart that shows query trend based on intent?

You can do this on Data Studio using this particular regex formula.

WHEN REGEXP_CONTAINS(Query,'^[buy|shop|online]') THEN "Transactional Queries"
WHEN REGEXP_CONTAINS(Query,'[dress]') THEN "Dress Queries"
WHEN REGEXP_CONTAINS(Query,'^[how]') THEN "How To Queries"
ELSE "Other"

So this is how I have been segmenting query visualization on Google Data Studio, got any more ideas.

Do share with us in the comments; I will add that into the post. 😉

Leave a Comment