Data Studio Tutorial: Branded vs Generic Regex

When analyzing the results of an SEO campaign, it is important to separate branded and generic (non-branded) keywords to truly understand performance and where the opportunity for optimization lies. 

By visualizing this data, you can improve your SEO marketing methods and balance them to capture the greatest number of customers. 

In this step-by-step tutorial for separating brand vs non-branded keywords in Google Data Studio, you’ll learn how to add a second page to your Data Studio report and include a table. Learn how to create a new field and master the REGEXP formula for branded vs. generic keywords as part of Analytics in Minutes’ series on building the Ultimate Search Console Report for SEO marketing. 

Or, skip ahead to the branded vs generic video and learn in under 3 minutes.

How-To Display Branded vs Generic Keywords in Data Studio

A brand vs generic page in Google Data Studio separates search queries into two segments: branded terms, which are search terms that include your brand name, and generic terms, which are search terms that do not include the brand name.

Here’s how to do it.

  1. Open Google Data Studio
  2. Click “Add a Page” in the top left corner.
  3. Click “Add a Chart” in the top navigation bar and add a table to the page.

Now we need to build our data source using the menu options on the right side of the page.

Make sure you set Data Source to “Site Impressions.” The Search Console_Site Impressions data source includes the field “average position.”

You can imagine “average position” is important to visualizing how a website is ranking for branded and nonbranded search queries.

Creating a Custom Field in Data Studio

To get a branded vs generic dimension, you will need to create a custom field in data studio.

  1. Click “Add a Field” on the bottom right of your screen.

This will bring up a half-screen where you’ll be able to adjust your query in the formula box.  

  1. Name your field.

Field name is for internal purposes, name it something that’s going to make sense for you and your team.

  1. Type in the regex formula:
Branded vs Generic Keywords Regex for Data Studio Reporting

A green check mark will appear in the bottom left when the formula syntax is valid.

  1. Click Save.
  1. Click the blue “Done” button.

New calculated option will display under “Fields” in the right-hand menu.

  1. Select your brand vs nonbranded custom field as your dimension.
  2. Edit display title for your “Dimension.”
  3. Select Metrics:
    • Query
    • Impressions
    • Clicks
    • Site- CTR
    • Avg. Position
  4. Click – Hold – Drag the vertical blue lines to align table.

That’s it! Click the blue “View” button in the upper right-hand corner to see the finished result.

Check out more data studio tutorials by Analytics in Minutes.

Video Transcript: Brand vs NonBranded Keywords

Now we will move on to brand vs generic. What the brand vs generic page does is separates the search queries from branded terms, terms that include your brand name and generic terms, and terms that do not include the brand name. Let’s get started. 

First thing you’ll want to do is, in the top left corner, click “Add A Page.” And then add your table, which is found underneath. Add a chart. Now we need to build our data source. Make sure you have “Site Impressions” selected. This will give you the available fields of average position so you can see now the ranking for branded and generic terms.

You will need to create a new field in order to get our dimension of branded vs generic. So our formula is going to be a regular expression: case when match. Going to be adjusting my query. And then here you will include all variations of your brand: brand name and separate. Here we are, and you’ll get this green check mark down here when the formula syntax is valid. And then name your field. Name it something that’s going to for internal purposes that will make sense for you, and click “Save.” 

You will see this calculated field now as an option underneath your fields so you can create your “Dimension”. You’ll want to edit the title because that’s what your header up here is going to be. And then our metrics. We want to know how many are indexed on google, so “Query,” then “Impressions,” “Clicks,” “Site click-through rate,” and “Average position.” Again, this vertical dotted blue line–you can adjust so that you get your full chart. So that’s the end of step one for the branded first generic page of our SEO report.

Subscribe and catch a new video from Analytics in Minutes every Friday.

Google Analytics Help

Schedule a meeting with Kayle Larkin to view Data Studio reporting options or discuss how analytics can power your search engine marketing strategy.


Press Inquiries


GA4 Services