Skip to main content

How to configure Drupal Commerce for Google Shopping

Jul 2, 2019

For those who are unfamiliar with Google Shopping, it is a search through e-commerce products. Similar to what we have as Images search or Google News. In our case, we will talk about Google Shopping Ads, which allows advertising your e-commerce products as visual cards in Google SERP.

This is a good way to improve your conversion and visibility. One more benefit, it helps to avoid visitors who just searching for information about certain topics. Google Shopping shows it’s advertising as product cards and makes it obvious that this site is about e-commerce.

Google Shopping ads screenshot

Some of our clients who use Drupal as an e-commerce platform requested to integrate it with Google Shopping platform. Even though the topic is quite obvious, I decided to sum up our experience with it so far. 

 

Preparing a Drupal Commerce products feed

There a few different ways to set up a data export suitable for Google Shopping. Google Shopping allows data provided as CSV feed, as REST API requests or as Google Spreadsheet. I will focus on CSV export since it is the most convenient and flexible approach.

Drupal.org database contains a bunch of modules meant to be a Google Shopping integration:

One might consider this result very unfortunate since none of the modules listed above is well-maintained. Fortunately for us, Google expects a simple CSV, which can be easily configured through the views, using Views Data Export module.

Configuring the Google Merchant part using Views Data Export

Using Views Data Export module is well documented and web flooded with all sorts of tutorials. In our case views configuration looks like the following screenshot:

Drupal views screenshot. Showing Google Shopping export configuration.

All data were retrieved from Product and Product Variation entities, except for a few fields:

  • GTIN. In our case products did not have GTIN, so this value was hardcoded to empty string.
  • MPN. The same situation as with GTIN.
  • Availability. We created data export for blck.ink project. This project is meant to supply products on demand directly from the manufacturer with no warehouse. In this case, our availability is hardcoded to be always “in stock”. In your case, it can be a separate boolean field in product variation.

Once the data export has been configured, the only thing left is to set up a Google Merchant account and submit a data. Google runs its own validation and finally allows to promote your products through a special type of Google Adwords campaign.

Possible issues with Google Merchant and Drupal Commerce

Our first version of Google Merchant Feed was refused to be published due to the following errors:

  • Account suspended due to policy violation: return and refund policy
  • Account suspended due to policy violation: no online purchasing means

Account suspended due to policy violation: return and refund policy

This type of error was easily fixed by moving the “refund policy” link in a more prominent place. (initially, it was hidden on some page with no direct link to the particular section.

Return and refund policy and shipping links screenshot

Account suspended due to policy violation: no online purchasing means

This one was a bit tricky. Since I could not find any relevant explanation of what kind of “purchasing mean” these guys expect. I was thinking that huge “Add to Cart” button is enough for customers to understand that this product can be purchased.

  • Here are a few tips which can help you if you have this issue:
  • Ensure that you have an obvious “Add to cart” button.
  • Ensure that the product “Quantity” field defaults to 1 (or whatever amount is minimal value for your site).
  • Ensure that customers can proceed with checkout without a registration
  • Ensure that customers can select “Home delivery” delivery in their shipping options (in our case we did not have such an option and our account was suspended).

Conclusion

We continue experimenting with Google Merchant platform and I assume that later we might have something to add. 

Read our blog, follow our social networks, and feel free to contact us if you need any help with Drupal or Google Shopping.

P.S. Just wanted to share a list of reliable Top Small Business eCommerce Companies. Feel free to check it out if you need an eCommerce partner.