00:00:00
I want to start by putting you all in the mindset that I was in when I was asked to work on LivingSocial's SEO. At that time, my responsibilities were mainly focused on back-end work to support our merchants. I had a lot of research to do before I could even look at any code. As a back-end developer, the extent of my SEO knowledge was pretty basic, mostly thinking it was something marketing worried about. Like many in this industry, I turned to my good friend Google.
00:00:27.599
So today I want to share with you the steps that I took to learn more about SEO, in the hopes that you can go and implement these steps frustration-free. After all, SEO is not a four-letter word. As a teacher, you're very familiar with all sorts of words, and let's just say that some of them can feel like they come from teenagers! We'll start by taking a look at what SEO means in a general sense. Then we'll dive into why providing well-structured data to search engines is important for page ranking. There are two forms of structured data that we'll look at: Microdata and JSON-LD. We'll also explore two tools that Google provides to aid you in your quest: Google Search Console and the Structured Data Testing Tool. Finally, we'll arrive at the importance of JSON-LD in your Rails app.
00:01:05.549
This process echoes my own path as I explored what type of structured data would best improve our search results. A little aside here: are there any country music fans in the room? Probably not! I keep hearing Jason Aldean's 'I Ain't There,' and I knew it wasn't going to fly very far. But maybe there’s somebody here who knows something about that.
00:02:02.969
SEO, or Search Engine Optimization, is the process of getting traffic to your website via the natural or free results from a search engine. This is in contrast to results that are paid for, like those first three ads you might see when you type something into Google. While you can't control the algorithms that search engines use to present your site to users, there are several ways that you can boost your site's visibility. You can ensure that your site has a logical architecture, use enough relevant keywords, and provide content that matches the search terms people might use, among other things.
00:02:30.000
So, at this point, you've learned as much about SEO as I knew when I started, and now let's take a deep dive into what I did to improve our page rankings. SEO is an umbrella that covers many different elements. There are countless factors at play, and we'd be here for weeks if I talked about each one. For today, I want to focus on one area in particular that can directly affect the ranking of your site or page. Search engines can pick up on keywords in places like your title or meta tags, but that can only get you so far in rankings.
00:03:22.580
Even if the title is very specific to the page, like 'Insignia 0.7 Cubic Foot Microwaves Black,' it's essential to provide detailed information that keeps users engaged. Users want to know things like price or ratings for products, the address for a concert venue, or if a restaurant is a family-friendly wine bar. We need to ensure that the kind of data we present to search engines is structured. Structured data is organized in a predictable and logical manner, making it easier for search engines to digest.
00:05:06.300
I learned that a product will typically have a price and a name, while an event will usually have a venue, which search engines expect. Context matters—search engines have different expectations based on what kind of data they are processing. I liken it to telling spellcheck that I'm using Spain's Spanish in a document—set the right expectation upfront. The first step for me was to check what our existing structures looked like. If someone spent time working on your app's SEO before you, you might already have existing data, but it could contain errors. If your data hasn’t been touched in a while, it’s crucial to evaluate it.
00:06:09.670
The standard context provided by schema.org defines Microdata, which consists of name-value pairs. Microdata is an open community HTML specification that nests structured data within HTML context. This markup uses some basic syntax, such as itemscope, itemtype, and itemprop, to define items. For example, I can inform the search engine that I'm about to introduce an item, what type it is, and what to expect from it.
00:06:53.560
Although this data can be very informative, it can also be challenging to separate the structured data from what is rendered for users. Once I familiarized myself with our Microdata and learned where we defined it within our views, the next step was to find out what errors we had. For that, I turned to Google Search Console. Google Search Console is a free service offered by Google that helps you monitor and maintain your site's presence in their search rankings. There are many things you can do with the Search Console, but for the purposes of finding errors, the structured data section is especially helpful.
00:07:43.100
In the Google Search Console, you can drill down into the structured data errors and see where the problems lie. I found many instances where events were not associated with a fixed venue, meaning they were missing key venue details. After identifying these issues, I began to address the errors. This often meant adding in omitted mandatory data or fixing microdata that was broken.
00:09:00.279
After I verified that I had the correct structure, I could then test production data locally with the Google Structured Data Testing Tool. With this testing tool, you can either test live data without affecting it or validate the structure you're building before coding solutions. Errors and warnings are indicated, and while you don't have to fix warnings, it’s advisable to address them. Once I identified and corrected the errors, I redeployed the changes and returned to check the Search Console.
00:10:38.800
Even after making corrections, you might still see the same amount of errors initially, as it takes Google some time to crawl your site and see the updates. However, your error numbers should trend down as time goes on. If you've fixed all the issues but continue to see red flags for individual items, it's worth revisiting the Search Console to ensure they are free from errors.
00:12:05.520
I got to the point where I thought, "Great! All the errors are fixed!" But it turns out that while correcting errors is necessary, just focusing on that won’t yield the best results if you're still using the Microdata format. I hadn’t yet investigated whether there was any additional data I could be surfacing for the search engines. Now you might be wondering, 'When is she going to talk about Ruby at a Ruby conference?' Well, here comes the fun part for me.
00:13:33.880
As someone who loves digging through databases, it turned into a treasure hunt of sorts. I explored what extra information we stored in our database that we might not have been exposing to the front end. For instance, if you have data about a restaurant's longitude and latitude but aren't showing it on the front end, that could be valuable to search engines.
00:14:34.870
Structured data is crucial, and JSON-LD is preferred by search engines like Google. Unlike Microdata, JSON-LD markup doesn’t have to be interwoven with user-visible content, making nested data easier to express. By digging deeper into your databases, you start to build your own JSON structure with real data before writing the code to dynamically generate this information.
00:16:12.990
After creating the JSON structure, you might need to write methods to conditionally handle nested data structures depending on the complexity of your data. You can then insert these structures into your relevant pages, ensuring data is only included when it's necessary, helping to avoid issues with malformed data that can frustrate Google.
00:17:37.420
JSON-LD offers the advantage of being organized, allowing for clarity in altering or adding information without diving into the complex item scopes and nested partials. Another major advantage of using JSON-LD over Microdata pertains to rich cards or snippets. These richer presentations improve user engagement because they present a more structured and visual overview of the data.
00:19:30.660
While structured data and employing JSON-LD won't magically place your site at the top of search results, it does represent a significant step toward improving visibility. If a small business evolves from having no structured data to implementing JSON-LD, they’re likely to see a positive change in rankings, particularly when highlighting what makes them unique.
00:20:06.661
This journey is about effectively investing your time to enhance your structured data, which will ultimately heighten your site's chances of being noticed. Improving broken data is critical, as poorly structured information may be flagged by Google. In my experience, refining our structured data from Microdata to JSON-LD led to significant improvements in our search results. Thank you for your attention, and I hope you find these insights useful in enhancing your applications.