Connect with us

SEO

How To Unlock Better Google Data Studio Segments Using “CASE”

Published

on

Imagine you’re looking at a bar chart of Google Ads conversions by month in Google Data Studio.

You want to know how brand campaigns are affecting performance.

Image by author, April 2022

You decide to add Campaigns as a “breakdown dimension” so you can see conversions by campaign.

That segmentation doesn’t give you the result you’d hoped:

Stacked bar chart with more than 40 campaignsImage by author, April 2022

With dozens of campaigns across multiple accounts, this chart is far too noisy to be useful.

So… what now?

You could create a filter for brand campaigns.

Advertisement

However, that will filter out any non-brand campaign performance – which you don’t want to do.

If it were supported, importing your labels from Google Ads would solve the problem.

How can you create your own segments in Data Studio, so you’re fully in control of your visualizations and can drive better insights?

Answer: CASE.

This CASE statement lets you group the branded and non-branded campaigns into two separate segments:

New field screen in Data Studio showing CASE statement grouping campaignsScreenshot taken by author, April 2022

Using the above code, campaigns that don’t include “Brand” (or the Dutch language “Merknaam”) will be grouped as “NonBrand.”

The final result is exactly what we hoped for: A stacked bar chart with a breakdown dimension showing conversion totals for only “Brand” and “NonBrand” campaign groups.

Advertisement
Stacked bar chart of brand and nonbrand campaign groups over timeImage by author, April 2022

The trend in this chart is clear: Brand conversions have been steadily declining over the year.

That insight can now drive a strategy to address the issue.

If using CASE to get custom segments in Data Studio has left you frustrated and bewildered, fear not.

This article will show you how to use CASE with confidence, and give you some examples you can apply directly to your reports for better visualizations.

The Case For CASE

It’s hard to discuss CASE expressions without getting a little technical, so let’s start with W3 School‘s definition of a CASE statement:

The CASE statement goes through conditions and returns a value when the first condition is met (like an if-then-else statement). So, once a condition is true, it will stop reading and return the result.

If no conditions are true, it returns the value in the ELSE clause. If there is no ELSE part and no conditions are true, it returns NULL.

In other words, you set the conditions for your segment (“brand campaigns” in the example above).

Advertisement

If the condition is met (campaign name contains “brand”), it’s included in the Brand group. If the condition is not met (campaign name does not contain “brand”), it’s in the NonBrand group.

If that illustration sounds overly simplistic, let’s look at a slightly more complex scenario for using CASE from Google Data Studio’s Help pages:

A common use for CASE is to create new categories or groupings of data. For example, to group selected country values into a Sales Region dimension, you might create a CASE expression like this:

CASE

WHEN Country IN (“USA”,”Canada”,”Mexico”) THEN “North America”
WHEN Country IN (“England”,”France”) THEN “Europe”
ELSE “Other”

END

In this example, five different countries are consolidated into two different continents, with an “other” category to catch any additional countries.

Advertisement

A list of dozens or even hundreds becomes a clean list of three.

The Power Of Data Studio CASE Expressions

Simplify, clarify and focus busy charts using custom groups and segments.

Compilation of charts and tables before and after using custom fields with case statementsImage by author, April 2022

Using CASE expressions, you can:

  • Rebuild the labels used in your Google Ads account.
  • Group Google Ads campaigns by priority, targeted region, language, or theme.
  • Consolidate or customize default dimensions in your data source (such as swapping Google Analytics default channel grouping with Custom Channel Grouping).
  • Compare the performance of one keyword or asset against a group or category.

After learning some basic syntax and structure, you can create CASE expressions to solve your specific segmentation and classification challenges.

How To Use CASE Expressions In Data Studio

Looking for the step-by-step instructions for using Data Studio CASE expressions? Look no further.

Here we’ll review how to add a CASE statement and set up the formula.

1. Create A Calculated Field

You’ll find this option at the bottom right section of the Data Panel. Click the blue “Add a Field” button.

Image showing location of Screenshot taken by author, April 2022

2. Enter And Save The CASE Statement

Give your field a name, then enter the statement into the formula box (more on that below).

Screenshot of Screenshot taken by author, April 2022

A valid formula will show a small green arrow beneath the formula box.

Then hit “Save” (or “Update”) and “Done.” Skipping “Save” has the exact result you’d expect, so don’t forget to click both buttons.

Advertisement

3. Add The Field As A Dimension In Your Chart

You’ll find your new field containing the CASE statement in your list of Available Fields from the Data Panel, and you can add it as a dimension for your chart.

Location of dimension field in Data PanelScreenshot taken by author, April 2022

You can edit the CASE expression any time by clicking on it from the “Available Fields” section of the Data Panel.

How To Write Your CASE Statement

Now that you know how to add a CASE expression in Data Studio let’s look at the syntax you’ll use to build your formula.

You’ll use the following components in the formula box for your CASE statement:

  • CASE (opens the formula).
  • WHEN (describes the condition).
  • THEN (describes the result when the condition is met).
  • ELSE (optional: describes the result when the condition is not met).
  • END (closes the formula).

As you’ve already seen in this article, there are many ways to format a CASE statement.

Ultimately, you’ll want to find a “common denominator” that’s true only for the condition you’re defining with “WHEN.”

Here are some examples of how you could set up the WHEN / THEN formula:

  • WHEN [field] = “condition” THEN “result”
  • WHEN [field] != “condition” THEN “not result”
  • WHEN [field] IN (“Value A”, “Value B”, “Value C”) THEN “result”
  • WHEN REGEXP_MATCH ([field], “.*condition*”) THEN “result”
  • WHEN CONTAINS_TEXT ([field], “condition”) THEN “result”

You can get much more advanced than this, but it should be enough to get you started.

CASE Limitations And Caveats

With the great power of CASE comes the great responsibility of making sure your data is actually… accurate.

Advertisement

Here are some things to watch for and fix.

Aggregation Errors And Solution

Your data source and metric aggregation method can lead to inaccurate or broken charts, including:

  • Non-weighted average of an average: Averaging an average distorts actual performance metrics.
  • Avg. metric summing: Showing the total of an average is just wrong.
  • User configuration error: Some data sources will throw a configuration error instead of displaying improper aggregates.
Compilation image of potential errors using CASEImage by author, April 2022

Solution: Don’t aggregate pre-calculated fields.

If you have a metric that’s a calculation (CPC, AOV) rather than a raw total (Cost, Sessions), here’s what to do instead:

Create a new calculated field. Enter the formula, and swap the metric in your chart’s Data Panel with your new field.

New field screen showing cost / clicks formulaImage by author, April 2022

Segmentation Trap (Signal Vs. Noise)

There’s no limit to how you can slice and dice data, but there is a limit on how valuable some data segments will be.

Correlation is not causation, and identifying trends is not as valuable as knowing the cause.

So while you could segment your data by Avg CPC ranges, it’s the intent of the keyword, not the cost of the click, that drives post-click performance.

Advertisement

Be sure your segments relate to the effect shown in your chart, or you’ll find yourself optimizing for noise instead of signal.

Other Limitations

CASE has other constraints.

For instance:

  • CASE operates in sequential order. If a value meets the criteria for multiple categories, it will only be included in the first one listed in the CASE statement.
  • You can’t mix dimensions and metrics within a WHEN condition.
  • You can’t use a formula within a WHEN or THEN clause.
  • The CASE field you create is unique to the data source. If you need the same formula for multiple data sources, you’ll need to create new instances.

You’ll learn more about CASE by using it, but knowing the limitations means less time troubleshooting and searching help forums.

Conclusion

CASE statements are a powerful way to group and segment your data in Google Data Studio.

It’s not as simple as the drag-and-drop assembly you’re used to. But it’s also not out of reach.

Learn the basic rules and syntax, and before you know it, it’ll become a go-to tool in your visualizations toolbox.

Advertisement

More resources:


Featured Image: Billion Photos/Shutterstock



Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address

SEO

Google On Hyphens In Domain Names

Published

on

By

What Google says about using hyphens in domain names

Google’s John Mueller answered a question on Reddit about why people don’t use hyphens with domains and if there was something to be concerned about that they were missing.

Domain Names With Hyphens For SEO

I’ve been working online for 25 years and I remember when using hyphens in domains was something that affiliates did for SEO when Google was still influenced by keywords in the domain, URL, and basically keywords anywhere on the webpage. It wasn’t something that everyone did, it was mainly something that was popular with some affiliate marketers.

Another reason for choosing domain names with keywords in them was that site visitors tended to convert at a higher rate because the keywords essentially prequalified the site visitor. I know from experience how useful two-keyword domains (and one word domain names) are for conversions, as long as they didn’t have hyphens in them.

A consideration that caused hyphenated domain names to fall out of favor is that they have an untrustworthy appearance and that can work against conversion rates because trustworthiness is an important factor for conversions.

Lastly, hyphenated domain names look tacky. Why go with tacky when a brandable domain is easier for building trust and conversions?

Advertisement

Domain Name Question Asked On Reddit

This is the question asked on Reddit:

“Why don’t people use a lot of domains with hyphens? Is there something concerning about it? I understand when you tell it out loud people make miss hyphen in search.”

And this is Mueller’s response:

“It used to be that domain names with a lot of hyphens were considered (by users? or by SEOs assuming users would? it’s been a while) to be less serious – since they could imply that you weren’t able to get the domain name with fewer hyphens. Nowadays there are a lot of top-level-domains so it’s less of a thing.

My main recommendation is to pick something for the long run (assuming that’s what you’re aiming for), and not to be overly keyword focused (because life is too short to box yourself into a corner – make good things, course-correct over time, don’t let a domain-name limit what you do online). The web is full of awkward, keyword-focused short-lived low-effort takes made for SEO — make something truly awesome that people will ask for by name. If that takes a hyphen in the name – go for it.”

Pick A Domain Name That Can Grow

Mueller is right about picking a domain name that won’t lock your site into one topic. When a site grows in popularity the natural growth path is to expand the range of topics the site coves. But that’s hard to do when the domain is locked into one rigid keyword phrase. That’s one of the downsides of picking a “Best + keyword + reviews” domain, too. Those domains can’t grow bigger and look tacky, too.

That’s why I’ve always recommended brandable domains that are memorable and encourage trust in some way.

Advertisement

Read the post on Reddit:

Are domains with hyphens bad?

Read Mueller’s response here.

Featured Image by Shutterstock/Benny Marty

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

SEO

Reddit Post Ranks On Google In 5 Minutes

Published

on

By

Google apparently ranks Reddit posts within minutes

Google’s Danny Sullivan disputed the assertions made in a Reddit discussion that Google is showing a preference for Reddit in the search results. But a Redditor’s example proves that it’s possible for a Reddit post to rank in the top ten of the search results within minutes and to actually improve rankings to position #2 a week later.

Discussion About Google Showing Preference To Reddit

A Redditor (gronetwork) complained that Google is sending so many visitors to Reddit that the server is struggling with the load and shared an example that proved that it can only take minutes for a Reddit post to rank in the top ten.

That post was part of a 79 post Reddit thread where many in the r/SEO subreddit were complaining about Google allegedly giving too much preference to Reddit over legit sites.

The person who did the test (gronetwork) wrote:

“…The website is already cracking (server down, double posts, comments not showing) because there are too many visitors.

…It only takes few minutes (you can test it) for a post on Reddit to appear in the top ten results of Google with keywords related to the post’s title… (while I have to wait months for an article on my site to be referenced). Do the math, the whole world is going to spam here. The loop is completed.”

Advertisement

Reddit Post Ranked Within Minutes

Another Redditor asked if they had tested if it takes “a few minutes” to rank in the top ten and gronetwork answered that they had tested it with a post titled, Google SGE Review.

gronetwork posted:

“Yes, I have created for example a post named “Google SGE Review” previously. After less than 5 minutes it was ranked 8th for Google SGE Review (no quotes). Just after Washingtonpost.com, 6 authoritative SEO websites and Google.com’s overview page for SGE (Search Generative Experience). It is ranked third for SGE Review.”

It’s true, not only does that specific post (Google SGE Review) rank in the top 10, the post started out in position 8 and it actually improved ranking, currently listed beneath the number one result for the search query “SGE Review”.

Screenshot Of Reddit Post That Ranked Within Minutes

Anecdotes Versus Anecdotes

Okay, the above is just one anecdote. But it’s a heck of an anecdote because it proves that it’s possible for a Reddit post to rank within minutes and get stuck in the top of the search results over other possibly more authoritative websites.

hankschrader79 shared that Reddit posts outrank Toyota Tacoma forums for a phrase related to mods for that truck.

Advertisement

Google’s Danny Sullivan responded to that post and the entire discussion to dispute that Reddit is not always prioritized over other forums.

Danny wrote:

“Reddit is not always prioritized over other forums. [super vhs to mac adapter] I did this week, it goes Apple Support Community, MacRumors Forum and further down, there’s Reddit. I also did [kumo cloud not working setup 5ghz] recently (it’s a nightmare) and it was the Netgear community, the SmartThings Community, GreenBuildingAdvisor before Reddit. Related to that was [disable 5g airport] which has Apple Support Community above Reddit. [how to open an 8 track tape] — really, it was the YouTube videos that helped me most, but it’s the Tapeheads community that comes before Reddit.

In your example for [toyota tacoma], I don’t even get Reddit in the top results. I get Toyota, Car & Driver, Wikipedia, Toyota again, three YouTube videos from different creators (not Toyota), Edmunds, a Top Stories unit. No Reddit, which doesn’t really support the notion of always wanting to drive traffic just to Reddit.

If I guess at the more specific query you might have done, maybe [overland mods for toyota tacoma], I get a YouTube video first, then Reddit, then Tacoma World at third — not near the bottom. So yes, Reddit is higher for that query — but it’s not first. It’s also not always first. And sometimes, it’s not even showing at all.”

hankschrader79 conceded that they were generalizing when they wrote that Google always prioritized Reddit. But they also insisted that that didn’t diminish what they said is a fact that Google’s “prioritization” forum content has benefitted Reddit more than actual forums.

Why Is The Reddit Post Ranked So High?

It’s possible that Google “tested” that Reddit post in position 8 within minutes and that user interaction signals indicated to Google’s algorithms that users prefer to see that Reddit post. If that’s the case then it’s not a matter of Google showing preference to Reddit post but rather it’s users that are showing the preference and the algorithm is responding to those preferences.

Advertisement

Nevertheless, an argument can be made that user preferences for Reddit can be a manifestation of Familiarity Bias. Familiarity Bias is when people show a preference for things that are familiar to them. If a person is familiar with a brand because of all the advertising they were exposed to then they may show a bias for the brand products over unfamiliar brands.

Users who are familiar with Reddit may choose Reddit because they don’t know the other sites in the search results or because they have a bias that Google ranks spammy and optimized websites and feel safer reading Reddit.

Google may be picking up on those user interaction signals that indicate a preference and satisfaction with the Reddit results but those results may simply be biases and not an indication that Reddit is trustworthy and authoritative.

Is Reddit Benefiting From A Self-Reinforcing Feedback Loop?

It may very well be that Google’s decision to prioritize user generated content may have started a self-reinforcing pattern that draws users in to Reddit through the search results and because the answers seem plausible those users start to prefer Reddit results. When they’re exposed to more Reddit posts their familiarity bias kicks in and they start to show a preference for Reddit. So what could be happening is that the users and Google’s algorithm are creating a self-reinforcing feedback loop.

Is it possible that Google’s decision to show more user generated content has kicked off a cycle where more users are exposed to Reddit which then feeds back into Google’s algorithm which in turn increases Reddit visibility, regardless of lack of expertise and authoritativeness?

Featured Image by Shutterstock/Kues

Advertisement

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

SEO

WordPress Releases A Performance Plugin For “Near-Instant Load Times”

Published

on

By

WordPress speculative loading plugin

WordPress released an official plugin that adds support for a cutting edge technology called speculative loading that can help boost site performance and improve the user experience for site visitors.

Speculative Loading

Rendering means constructing the entire webpage so that it instantly displays (rendering). When your browser downloads the HTML, images, and other resources and puts it together into a webpage, that’s rendering. Prerendering is putting that webpage together (rendering it) in the background.

What this plugin does is to enable the browser to prerender the entire webpage that a user might navigate to next. The plugin does that by anticipating which webpage the user might navigate to based on where they are hovering.

Chrome lists a preference for only prerendering when there is an at least 80% probability of a user navigating to another webpage. The official Chrome support page for prerendering explains:

“Pages should only be prerendered when there is a high probability the page will be loaded by the user. This is why the Chrome address bar prerendering options only happen when there is such a high probability (greater than 80% of the time).

There is also a caveat in that same developer page that prerendering may not happen based on user settings, memory usage and other scenarios (more details below about how analytics handles prerendering).

Advertisement

The Speculative Loading API solves a problem that previous solutions could not because in the past they were simply prefetching resources like JavaScript and CSS but not actually prerendering the entire webpage.

The official WordPress announcement explains it like this:

Introducing the Speculation Rules API
The Speculation Rules API is a new web API that solves the above problems. It allows defining rules to dynamically prefetch and/or prerender URLs of certain structure based on user interaction, in JSON syntax—or in other words, speculatively preload those URLs before the navigation. This API can be used, for example, to prerender any links on a page whenever the user hovers over them.”

The official WordPress page about this new functionality describes it:

“The Speculation Rules API is a new web API… It allows defining rules to dynamically prefetch and/or prerender URLs of certain structure based on user interaction, in JSON syntax—or in other words, speculatively preload those URLs before the navigation.

This API can be used, for example, to prerender any links on a page whenever the user hovers over them. Also, with the Speculation Rules API, “prerender” actually means to prerender the entire page, including running JavaScript. This can lead to near-instant load times once the user clicks on the link as the page would have most likely already been loaded in its entirety. However that is only one of the possible configurations.”

The new WordPress plugin adds support for the Speculation Rules API. The Mozilla developer pages, a great resource for HTML technical understanding describes it like this:

“The Speculation Rules API is designed to improve performance for future navigations. It targets document URLs rather than specific resource files, and so makes sense for multi-page applications (MPAs) rather than single-page applications (SPAs).

The Speculation Rules API provides an alternative to the widely-available <link rel=”prefetch”> feature and is designed to supersede the Chrome-only deprecated <link rel=”prerender”> feature. It provides many improvements over these technologies, along with a more expressive, configurable syntax for specifying which documents should be prefetched or prerendered.”

Advertisement

See also: Are Websites Getting Faster? New Data Reveals Mixed Results

Performance Lab Plugin

The new plugin was developed by the official WordPress performance team which occasionally rolls out new plugins for users to test ahead of possible inclusion into the actual WordPress core. So it’s a good opportunity to be first to try out new performance technologies.

The new WordPress plugin is by default set to prerender “WordPress frontend URLs” which are pages, posts, and archive pages. How it works can be fine-tuned under the settings:

Settings > Reading > Speculative Loading

Browser Compatibility

The Speculative API is supported by Chrome 108 however the specific rules used by the new plugin require Chrome 121 or higher. Chrome 121 was released in early 2024.

Browsers that do not support will simply ignore the plugin and will have no effect on the user experience.

Check out the new Speculative Loading WordPress plugin developed by the official core WordPress performance team.

Advertisement

How Analytics Handles Prerendering

A WordPress developer commented with a question asking how Analytics would handle prerendering and someone else answered that it’s up to the Analytics provider to detect a prerender and not count it as a page load or site visit.

Fortunately both Google Analytics and Google Publisher Tags (GPT) both are able to handle prerenders. The Chrome developers support page has a note about how analytics handles prerendering:

“Google Analytics handles prerender by delaying until activation by default as of September 2023, and Google Publisher Tag (GPT) made a similar change to delay triggering advertisements until activation as of November 2023.”

Possible Conflict With Ad Blocker Extensions

There are a couple things to be aware of about this plugin, aside from the fact that it’s an experimental feature that requires Chrome 121 or higher.

A comment by a WordPress plugin developer that this feature may not work with browsers that are using the uBlock Origin ad blocking browser extension.

Download the plugin:
Speculative Loading Plugin by the WordPress Performance Team

Read the announcement at WordPress
Speculative Loading in WordPress

Advertisement

See also: WordPress, Wix & Squarespace Show Best CWV Rate Of Improvement

Source link

Keep an eye on what we are doing
Be the first to get latest updates and exclusive content straight to your email inbox.
We promise not to spam you. You can unsubscribe at any time.
Invalid email address
Continue Reading

Trending

Follow by Email
RSS