Real-time SEO: Create a Google Product Feed from an XML Sitemap

Real-time SEO: Create a Google Product Feed from an XML Sitemap

March 11, 2019 4:03 pm

Google simply made an essential announcement for retailers that depend upon natural search visitors. It's now potential to replace product listings in natural search leads to actual time!

Advertisers have lengthy had this functionality on Google Purchasing. Now, corporations can use the identical product feeds for natural search, and sure, you don’t pay a single penny.

Merchants can now use product data feeds in Google Merchant Center to enhance organic search results. <em>Click image to enlarge.</em>

Retailers can now use product knowledge feeds in Google Service provider Middle to reinforce natural search outcomes. Click on picture to enlarge.

When you promote on Google Purchasing and have feeds with legitimate merchandise, there’s no further value. (For now, Google permits solely merchandise bought within the U.S.) The Feb. 22 announcement said, partially:

Product knowledge feeds uploaded to Google Service provider Middle will now be eligible for show in outcomes on surfaces like Search and Google Pictures. This product info will probably be ranked based mostly solely on relevance to customers’ queries, and no cost is required or accepted for eligibility. We’re beginning with the enlargement within the U.S., and help for different nations can be introduced later within the yr.

In case you are not spending cash on Google Buying and don’t plan to, you might not have a Google product feed. On this article, I’ll clarify the best way to create one from an XML sitemap.

Product Feed

After you join Google Service provider Middle, comply with these steps:

  1. Beneath Merchandise, click on “Feeds,” after which the floating + sign up a blue sq..
  1. “Nation of sale” is america (for now). Then choose English within the “Content material language” pull down. Depart checked “Surfaces throughout Google” and uncheck “Buying advertisements” in case you are not going to promote on Google Buying.
  1. Subsequent, identify your feed, and choose “Google Sheets” because the supply.
  1. Lastly, choose “Generate a brand new Google spreadsheet from a template.”

The instance Google Sheet, under, is for a product feed utilizing hypothetical knowledge. Required fields — highlighted in inexperienced — are “id,” “title,” “description,” “situation,” “worth,” “availability,” “hyperlink,” and “picture hyperlink.”

One way to generate a product feed is via Google Sheets.

One solution to generate a product feed is by way of Google Sheets. Click on picture to enlarge.

Nevertheless, accumulating this information manually for hundreds of merchandise can be a whole lot of work. We will, as an alternative, use an XML sitemap with product URLs and routinely gather the info instantly from the product pages.

Product Information

For instance, I’ll generate a pattern product feed for P.C. Richard & Son, a brick-and-click on retailer of home equipment and electronics, utilizing the corporate’s product XML sitemap, which was in its XML sitemap index.

I'll outline content material extraction guidelines for the required columns as discovered on the instance gaming keyboard product web page, under. XPath, a question language, permits you to specify any component in an internet web page utilizing a particular conference, to extract content material.

XPath allows you to specify any element in a web page using a special convention that makes it easy for content extraction tools.

XPath permits you to specify any aspect on an internet web page for content material extraction. Click on picture to enlarge.

Within the screenshot above, I chosen the aspect to extract: “Corsair K55 RGB Gaming Keyboard with Three Zone Backlighting and Macro Keys.” I then proper clicked and selected “Parts” in Chrome Developer Instruments. You possibly can mouse over the component and the proper clicks once more to get the content material extractor. I chosen XPath and obtained this worth from Chrome: //*[@id=”addToCartCH9206015NA”]/div[4]/h1.

Once I repeated this for every required column, I acquired the next XPaths.

  • Id (mannequin quantity). //*[@id=”addToCartCH9206015NA”]/div[4]/div[1]/div[1]/textual content()[1]
  • Title. //*[@id=”addToCartCH9206015NA”]/div[4]/h1
  • Description. //*[@id=”tech-specs”]/div/dl[2]/dd[1]/textual content()
  • Situation. I’ll assume it's new.
  • Worth. //*[@id=”addToCartCH9206015NA”]/div[5]/div/div[1]/div[2]/span
  • Availability. I’ll assume the merchandise is accessible until said in any other case.
  • Hyperlink. We all know the web page URL.
  • Picture hyperlink. //*[@id=”mainImage”]

Validating XPaths

Subsequent, I'll affirm that the XPaths will work. I can do that instantly utilizing the Parts tab in Chrome Developer Instruments.

Use the Elements tab in Chrome Developer Tools to make sure XPaths will work. <em>Click image to enlarge.</em>

Use the Parts tab in Chrome Developer Instruments to ensure XPaths will work. Click on picture to enlarge.

Within the Parts tab, sort Ctrl+F to open a search field. Sort the XPath you need to confirm there. Sort slowly to see the place it really works and doesn’t. For instance, to confirm our product id XPath, I shortened it to:

//*[@id=”addToCartCH9206015NA”]/div[4]/div[1]/div[1].

This captures greater than I want; I'll clear up after extraction. You possibly can repeat this course of to confirm and regulate the remaining XPaths.

Word that if I disable JavaScript, the product info field disappears. Some XPaths we calculated gained’t work until our crawler renders the content material utilizing JavaScript.

If you disable JavaScript, the product information box disappears.

When you disable JavaScript, the product info field disappears.

Extraction

Now's the enjoyable half. I'll run the extraction course of utilizing Screaming Frog, however different net crawlers will do the job, too. I’ll begin by copying our validated XPaths to Screaming Frog, at Configuration > Customized > Extraction.

Run the extraction process using Screaming Frog or your favorite web crawler. <em>Click image to enlarge.</em>

Run the extraction course of utilizing Screaming Frog or your favourite net crawler. Click on picture to enlarge.

Enter the identify of every column from the Google Sheet you'll extract. Then click on on the “Inactive” pull-down menu and choose XPath. Copy and paste the verified XPath, then choose “Extract Textual content” in case your XPath ends with textual content(). In any other case, depart as “Extract Inside HTML.” Click on OK to save lots of your XPaths.

Subsequent, I’ll change the default Screaming Frog rendering conduct from textual content to JavaScript so all XPaths will work. Discover the setting in the primary menu beneath Configuration > Spider > Rendering.

change the default Screaming Frog rendering behavior from Text to JavaScript so all the XPaths work.

Change the default Screaming Frog rendering conduct from textual content to JavaScript so all of the XPaths will work. Click on picture to enlarge.

Screaming Frog will now do the heavy lifting. In the primary menu change the mode to “Listing,” click on on “Add,” and choose “Obtain Sitemap,” which, in our case, is the URL of the merchandise XML sitemap we found above for P.C. Richard & Son. The extracted columns will seem on the finish of the info grid. Observe the picture hyperlinks on the screenshot under getting extracted appropriately.

The extracted columns will appear at the end of the data grid.

The extracted columns will seem on the finish of the info grid. This screenshot exhibits the picture hyperlinks being extracted. Click on picture to enlarge.

After the crawl is completed, export it to a CSV file. Import that file to Google Sheets, take away the columns with the pointless metadata, and carry out any cleanup immediately in Google Sheets. For instance, our picture URLs are relative, however we'd like them as absolute.


You may also like...